Setup: 3 git repos - on github, local and on staging server.
I develop locally, push it to github and staging server pulls.
I don't work nor commit changes on staging server, but I must have done so long time ago. Because now I get the following message when I do git status
(on staging server):
On branch SOME_BRANCH
Your branch and 'origin/SOME_BRANCH' have diverged,
and have 4 and 32 different commit(s) each, respectively.
My question is: how do I see those exact 4 commits that are not at origin
?
git rev-list origin..HEAD
This lists the commits in your branch (HEAD) that are not in origin.
Generically, if your remote is called foo and your branch is bar:
git rev-list foo/bar..HEAD
@charlesb is the answer for being in the master branch with remote called origin.
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