Skip to content

Instantly share code, notes, and snippets.

@RitterNorbert
Last active October 2, 2018 13:25
Show Gist options
  • Save RitterNorbert/b8ef9f8f94c89ad750b24b63ff062da5 to your computer and use it in GitHub Desktop.
Save RitterNorbert/b8ef9f8f94c89ad750b24b63ff062da5 to your computer and use it in GitHub Desktop.
list merged remote and delete
for branch in $(git branch -r --merged development | grep origin | grep -v development | grep -v master | sed -E "s|^ *origin/||g" | grep -w "NR")
do
git push origin $branch --delete
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment