Skip to content

Instantly share code, notes, and snippets.

@rodrigozrusso
Created March 27, 2018 09:26
Show Gist options
  • Save rodrigozrusso/99b5439897d51362f4e2656a5b426866 to your computer and use it in GitHub Desktop.
Save rodrigozrusso/99b5439897d51362f4e2656a5b426866 to your computer and use it in GitHub Desktop.
list commits between branches
if [ -z "$1" ]
then
echo "usage: ${0} newer_branch [old_branch | default: master]"
fi
NEWER_BRANCH=${1}
OLDER_BRANCH=${2}
if [ -z "$2" ]
then
OLDER_BRANCH='master'
fi
git rev-list ${NEWER_BRANCH} ^${OLDER_BRANCH}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment