Show ahead/behind for all local branches
Show ahead/behind for all local branches
Situation: You can do git status
to see how far ahead or behind the current branch your work is, but sometimes you want to see the status of all branches.
This is the command to run in terminal. Make sure you’re in the appropriate project directory.
$ git for-each-ref --format="%(refname:short) %(upstream:track) %(upstream:remotename)" refs/heads
See this stack overflow.
For more content on data science, R, and Python find me on Twitter.