Skip to content

Instantly share code, notes, and snippets.

@rafinskipg
Created December 16, 2014 11:37
Show Gist options
  • Save rafinskipg/96201826dc439a89555f to your computer and use it in GitHub Desktop.
Save rafinskipg/96201826dc439a89555f to your computer and use it in GitHub Desktop.
git-branch-log
# Show the logs of a local branch
#
# An alternative option could be (with caveats): git log --walk-reflogs $1
#
# See: http://stackoverflow.com/questions/14848274/git-log-to-get-commits-only-for-a-specific-branch
git log $1 --not $(git for-each-ref --format='%(refname)' refs/heads/ | grep -v "refs/heads/$1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment