Skip to content

Instantly share code, notes, and snippets.

@schnell18
Created November 29, 2013 12:38
Show Gist options
  • Save schnell18/7705133 to your computer and use it in GitHub Desktop.
Save schnell18/7705133 to your computer and use it in GitHub Desktop.
Find all branches not yet merged into current branch. It is equivalent of git branch --no-merged
for t in $(git for-each-ref --format="%(refname)")
do
c=$(git rev-list HEAD..$t)
if [[ ! -z $c ]]; then
echo $t
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment