Skip to content

Instantly share code, notes, and snippets.

@iPublicis
Forked from agnoster/git-unmerged
Created May 29, 2020 19:05
Show Gist options
  • Save iPublicis/6188c5e950e177bd9f871806b93a786d to your computer and use it in GitHub Desktop.
Save iPublicis/6188c5e950e177bd9f871806b93a786d 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