Skip to content

Instantly share code, notes, and snippets.

@jantimon
Created December 27, 2016 08:36
Show Gist options
  • Select an option

  • Save jantimon/5b9fd9330f38d076a374c03fcbb788e1 to your computer and use it in GitHub Desktop.

Select an option

Save jantimon/5b9fd9330f38d076a374c03fcbb788e1 to your computer and use it in GitHub Desktop.

Revisions

  1. jantimon created this gist Dec 27, 2016.
    3 changes: 3 additions & 0 deletions Git Cleanup Alias
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,3 @@
    [alias]
    # Delete any branches that have been merged except master, development and the current branch
    cleanup = !git remote prune origin && git branch --merged | egrep -v '(^\\*|master|develop)' | xargs git branch -d