Skip to content

Instantly share code, notes, and snippets.

@agnoster
Created March 23, 2012 13:59
Show Gist options
  • Save agnoster/2170922 to your computer and use it in GitHub Desktop.
Save agnoster/2170922 to your computer and use it in GitHub Desktop.
Check to see if which commits are not shared between two branches
#!/bin/bash
BRANCH1=${1:-master}
BRANCH2=${2:-HEAD}
echo; echo "Only in $BRANCH1"
git cherry -v $BRANCH2 $BRANCH1
echo; echo "Only in $BRANCH2"
git cherry -v $BRANCH1 $BRANCH2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment