I have created a branch for testing in my local repo (test-branch
) which I pushed to Github
.
If I go to my Github
account and select this test-branch
it shows the info:
This branch is 1 commit ahead and 2 commits behind master
My questions are:
- How can I display this info locally (ie: a command that shows this on the terminal, rather than having to open
Github
to see it)? -
I know I can see the diffs between branches using:
git diff master..test-branch
or using
Meld
(which I prefer):git difftool master..test-branch
but I was wondering if there’s a way to see the ahead and behind commits separately. I.E.: is there a way to show that 1 commit ahead by itself and then those 2 commits behind by themselves?