Skip to content

Instantly share code, notes, and snippets.

@garettmd
Created February 1, 2019 15:36
Show Gist options
  • Save garettmd/897b56da4c0c4babba95bd8d4ad9e629 to your computer and use it in GitHub Desktop.
Save garettmd/897b56da4c0c4babba95bd8d4ad9e629 to your computer and use it in GitHub Desktop.
Show merged git branches in a project directory
function show_merged() {
if [[ -z $1 ]]
then
BRANCH=master
else
BRANCH="$1"
fi
git branch --merged "${BRANCH}" | grep -Ev "${BRANCH}|master"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment