Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marc-hughes/c66f68fbbac9ca61e74644f5751c5df7 to your computer and use it in GitHub Desktop.
Save marc-hughes/c66f68fbbac9ca61e74644f5751c5df7 to your computer and use it in GitHub Desktop.
Git Alias to clean merged feature branches
# Put this into .gitignore:
[alias]
cleanfeature = branch --merged | grep "feature/" | xargs -n 1 git branch -d
# Then, run git cleanfeature - it will delete every branch with name containing feature/ that has been fully merged into the current branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment