Created
September 1, 2015 15:29
-
-
Save matt-snider/76b36cdba16750b1bfd5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/bash | |
# git-branch-diff | |
# | |
# Shows the difference in commits between two branches. If only | |
# one branch is given, the other defaults to HEAD. | |
# | |
# msnider$ | |
if [[ $# -eq 1 ]] ; then | |
git log --oneline HEAD..$1 | |
elif [[ $# -eq 2 ]] ; then | |
git log --oneline $1..$2 | |
else | |
echo "error: must specify at least one branch" >&2; exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment