Skip to content

Instantly share code, notes, and snippets.

@tomkersten
Created January 29, 2010 01:25
Show Gist options
  • Save tomkersten/289359 to your computer and use it in GitHub Desktop.
Save tomkersten/289359 to your computer and use it in GitHub Desktop.
# Assume 2 branches named 'current' and 'master'
# Show me the commits I have in current, which are not in master
git log current..master --pretty=oneline
# Show me commits in master which are not in my current branch
git log master..current --pretty=oneline
# Show me stuff that people have pushed to 'master' which I don't have yet (we'll call it 'origin' in this case),
# even though I have made commits locally on that branch (maybe you want to rebase to prevent unnecessary
# merge commit)
git fetch origin # retrieve current state of origin
git log origin/master..master --pretty=oneline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment