Skip to content

Instantly share code, notes, and snippets.

@dotemacs
Created September 4, 2012 12:58
Show Gist options
  • Save dotemacs/3620930 to your computer and use it in GitHub Desktop.
Save dotemacs/3620930 to your computer and use it in GitHub Desktop.
#!/bin/sh
if [ $# -lt 1 ]
then
echo
echo "Usage: $(basename $0) branch-name"
echo " where 'branch-name' is usually 'master'"
echo
exit
fi
BRANCH=${1}
echo
echo "local merged branches:"
echo
git branch --merged ${BRANCH} | sed -e "s/\ \ ${BRANCH}$/\ \ /g"
echo "---------------------------"
echo
echo "remote merged braches:"
echo
git branch -r --merged ${BRANCH} | sed -e "s/\ \ origin\//\ \ /g" -e "s/\ \ ${BRANCH}$/\ \ /g"
echo "---------------------------"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment