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?
Use: git branch -vv
to see which branches are tracked and which are 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:\prog\git\git>git branch -vv
* master 118f60e [origin/master] Sync with maint
^^^^^^^^^^^^^
|
--- now in blue
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With