git - 是否有命令行工具可以实时显示 git 状态?

标签 git command-line

我知道有 git gui 类似于 sourcetree 和 github 用于桌面,但我想知道是否有任何可用的东西可以从命令行使用来“观察”更改并显示 git 文件的状态。如果我要修改一个文件,它会更改它的状态,而无需运行 git status

最佳答案

如评论中所述,如果您在 Linux 上,则可以简单地使用 watch 命令,如下所示:

watch git status

来自手册页:

watch runs command repeatedly, displaying its output and errors (the first screenfull). This allows you to watch the program output change over time. By default, the program is run every 2 seconds and runs until interrupted.

如果你在 Mac 上,默认情况下你不会有 watch,但你可以通过 Homebrew 安装它,如下所示:

brew install watch

关于git - 是否有命令行工具可以实时显示 git 状态?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36431988/

相关文章:

eclipse - 命令行构建的最佳实践

eclipse git 混淆 : How to merge & push?

git - 如何正确设置 Azure DevOps 和 GitHub 之间的双向同步

windows - git,Windows 上的 SSH_ASKPASS

video - 为文件夹中的所有视频添加水印并仅在特定时间间隔内启用

python - Windows 目录名称无效

java - 如何在命令行编译使用 Apache Commons IO 的 Java 应用程序

xml - 使用 cURL 命令行 POST XML 文件

git - 如何在 Diff 的结果中导航

ruby-on-rails - 亚马逊 EC2 + Capistrano + Git : Permission denied (publickey)