Here is a command that gives you all tracking branches (configured for 'pull'), see:
(这是一个为您提供所有跟踪分支(配置为“拉”)的命令,请参见:)
$ git branch -vv
main aaf02f0 [main/master: ahead 25] Some other commit
* master add0a03 [jdsumsion/master] Some commit
You have to wade through the SHA and any long-wrapping commit messages, but it's quick to type and I get the tracking branches aligned vertically in the 3rd column.
(您必须仔细阅读SHA和所有长时间包装的提交消息,但是键入起来很快,我在第三列中将跟踪分支垂直对齐。)
If you need info on both 'pull' and 'push' configuration per branch, see the other answer on git remote show origin
.
(如果您需要每个分支上的'pull'和'push'配置信息,请参阅git remote show origin
上的其他答案。)
Update
(更新资料)
Starting in git version 1.8.5 you can show the upstream branch with git status
and git status -sb
(从git版本1.8.5开始,您可以显示带有git status
和git status -sb
的上游分支)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…