Advertisement
Guest User

Untitled

a guest
Sep 1st, 2015
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. # git-branch-diff
  3. #
  4. # Shows the difference in commits between two branches. If only
  5. # one branch is given, the other defaults to HEAD.
  6. #
  7. # msnider$
  8.  
  9. if [[ $# -eq 1 ]] ; then
  10. git log --oneline HEAD..$1
  11. elif [[ $# -eq 2 ]] ; then
  12. git log --oneline $1..$2
  13. else
  14. echo "error: must specify at least one branch" >&2; exit 1
  15. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement