What is the git equivalent of of hg outgoing (hg out) or hg incoming (hg in)? [duplicate]
Solution 1:
If you want to list commits that are on branch B
but not on branch A
, do git log A..B
.
If you want to list commits that are on your local branch dev
, but not the the remote branch origin/dev
, do:
git fetch origin # Update origin/dev if needed
git log origin/dev..dev
If you want to list commits that are on the remote branch, but not on the local branch, simply do the converse:
git fetch origin # Update origin/dev if needed
git log dev..origin/dev
Note: you might find it easier to compare branches graphically using gitk origin origin/dev