How can I print which of my git branches have unpushed commits? I don't care what the commits contain, but just that they're there and can push pushed off.
I'd like to see something like:
# On branch master
# Your branch is ahead of 'origin/master' by 2 commits.
or nothing at at all, if the local and remote branches are at the same place.
git branch -vv
This will list all your local branches along with their remotes letting you know what their status is (if they are ahead, behind or both).
To be sure that you are up-to-date for all the branches make sure to do git fetch
If you only want to see the branches that are ahead you can do:
git branch -vv | grep ahead
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