git log——安静不是安静
git log——安静不是安静,git,Git,git diff--quiet返回记录的退出代码 git log--quiet的行为与没有quiet时完全相同 我是否错过了文档中的某些内容: --quiet Disable all output of the program. Implies --exit-code. git 1.6.0 这应该在脚本中用于比较mybranch与origin/mybranch,以了解我是否应该推送它 git rev-list -1 origin/master..master | wc -l 从评论
git diff--quiet
返回记录的退出代码
git log--quiet
的行为与没有quiet时完全相同
我是否错过了文档中的某些内容:
--quiet
Disable all output of the program. Implies --exit-code.
git 1.6.0
这应该在脚本中用于比较mybranch与origin/mybranch,以了解我是否应该推送它
git rev-list -1 origin/master..master | wc -l
从评论中建议的链接来看,这似乎是最好的答案。这里有一个关于这一点的讨论:
git log上的--quiet
的确切目的是什么,我还考虑了git rev list origin/master..master | wc-l
建议的解决方案。但在我看来,git log-quiet如果有效的话将是一种更直接的方法。