5

I'd like to have a list of all branches with an info about what do they track. I.e.:

$ git branch -a -???
master  <-> origin/master
new_menu  <-> origin/feature1
remotes/origin/master
remotes/origin/feature1

Is there a way to achieve this?

Ondra Žižka
  • 43,948
  • 41
  • 217
  • 277
  • Possible duplicate of [how do I get git to show me which branches are tracking what?](https://stackoverflow.com/questions/4950725/how-do-i-get-git-to-show-me-which-branches-are-tracking-what) – Lesmana Jun 18 '17 at 16:31

1 Answers1

5

Verbose is what you want:

git branch -a -v

or

git branch -a -vv

--verbose

Show sha1 and commit subject line for each head, along with relationship to upstream branch (if any). If given twice, print the name of the upstream branch, as well.

manojlds
  • 290,304
  • 63
  • 469
  • 417