Skip to content

Instantly share code, notes, and snippets.

@dkinzer
Last active October 13, 2015 02:28
Show Gist options
  • Select an option

  • Save dkinzer/4125524 to your computer and use it in GitHub Desktop.

Select an option

Save dkinzer/4125524 to your computer and use it in GitHub Desktop.
Quickly delete all git branches that are fully deployed and follow a naming convention.
# Delete all deployed branches that are fully merged.
git branch -d --merged
# The above doesn't actually always work for me. So the next option is
git branch -d $(git branch --merged | cut -d \* -f 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment