Uzbekjon Uzbekjon - 2 years ago 55
Git Question

See exact divergence/commits between local and remote Git repo

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
?

Answer Source
git rev-list origin..HEAD

This lists the commits in your branch (HEAD) that are not in origin.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download