What is this branch tracking (if anything) in git?

After creating a branch with --track (or leaving the default, or --notrack), you later wish to be reminded of what a branch is tracking. Is there a way, other than searching through the .git/config file, to display what a branch is tracking?


使用: git branch -vv查看哪些分支被跟踪,哪些不是。


If you want to know for a given branch, you could do:

git config --get branch.<branch>.remote

If it prints a remote, it's tracking something. If it prints nothing and returns failure, it's not.


Note that with git1.8.3 (April 22d, 2013), you have a new way to emphasize the upstream branch:

" git branch --vv " learned to paint the name of the branch it integrates with in a different color ( color.branch.upstream , which defaults to blue ).

C:proggitgit>git branch -vv
* master 118f60e [origin/master] Sync with maint
                  ^^^^^^^^^^^^^
                       |
                       --- now in blue
链接地址: http://www.djcxy.com/p/4558.html

上一篇: 如何修复缺少的git远程详细信息?

下一篇: 这个分支在git中跟踪(如果有的话)是什么?