Created
February 14, 2014 14:14
-
-
Save jimschubert/9001653 to your computer and use it in GitHub Desktop.
Display log messages for commits in a given branch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
branchname="" | |
case $# in | |
0) branchname=$(git rev-parse --abbrev-ref HEAD) ;; | |
1) branchname="$1" ;; | |
*) branchname="$1" ;; | |
esac | |
git log $branchname --not $(git for-each-ref --format='%(refname)' refs/heads/ | grep -v "$branchname") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Drop this into
/usr/local/bin
and then execute withgit branchlog