How can I see which Git branches are tracking which remote / upstream branch?

Very much a porcelain command, not good if you want this for scripting:

git branch -vv   # doubly verbose!

Note that with git 1.8.3, that upstream branch is displayed in blue (see “What is this branch tracking (if anything) in git?”)


If you want clean output, see Carl Suster’s answer – it uses a porcelain command that I don’t believe existed at the time I originally wrote this answer, so it’s a bit more concise and works with branches configured for rebase, not just merge.

Leave a Comment