Skip to content

Instantly share code, notes, and snippets.

@aczietlow
Created January 28, 2014 21:24
Show Gist options
  • Select an option

  • Save aczietlow/8676850 to your computer and use it in GitHub Desktop.

Select an option

Save aczietlow/8676850 to your computer and use it in GitHub Desktop.
compare 2 git branches for commits missing from 1 branch
MASTER=`git log --pretty=format:'%H' 2014-01-14-fixes | sort`
DEV=`git log --pretty=format:'%H' master | sort`
for i in `diff <(echo "${MASTER}") <(echo "${DEV}") | grep '^>' | sed 's/^> //'`;
do
git --no-pager log -1 --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short $i;
echo ""
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment