Skip to content

Instantly share code, notes, and snippets.

@brenes
Created April 14, 2016 11:04
Show Gist options
  • Select an option

  • Save brenes/94a50a6b95d28c5aa9ec279feb8ac92e to your computer and use it in GitHub Desktop.

Select an option

Save brenes/94a50a6b95d28c5aa9ec279feb8ac92e to your computer and use it in GitHub Desktop.

Revisions

  1. brenes created this gist Apr 14, 2016.
    2 changes: 2 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    Delete local merged branches: git branch --merged | xargs -I BRANCH git branch -d BRANCH
    Delete remote merged branches: git branch -r --merged | grep -v '^*' | grep -v master | sed 's/origin\///g' | xargs -I BRANCH -P 10 git push origin :BRANCH