Skip to content

Instantly share code, notes, and snippets.

@searls
Created March 27, 2013 14:07
Show Gist options
  • Save searls/5254409 to your computer and use it in GitHub Desktop.
Save searls/5254409 to your computer and use it in GitHub Desktop.
A git command for logging all the commits on the current branch that are not on your first master as of your nearest common ancestor. Additional git-log flags come along for the ride (e.g. `git unmaster --oneline`)
#!/bin/sh
git log HEAD ^$(git merge-base master HEAD) --no-merges $1
@stevenharman
Copy link

You probably want

git log HEAD ^$(git merge-base master HEAD) --no-merges $@

which would allow me to pass more than one git-log argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment