Skip to content

Instantly share code, notes, and snippets.

@malclocke
Forked from schacon/gist:942899
Created April 27, 2011 01:31
Show Gist options
  • Select an option

  • Save malclocke/943565 to your computer and use it in GitHub Desktop.

Select an option

Save malclocke/943565 to your computer and use it in GitHub Desktop.

Revisions

  1. Malcolm Locke revised this gist Apr 27, 2011. 1 changed file with 1 addition and 5 deletions.
    6 changes: 1 addition & 5 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,3 @@
    $ git branch -r --merged |
    grep origin |
    grep -v '>' |
    grep -v master |
    xargs -L1 |
    awk '{split($0,a,"/"); print a[2]}' |
    awk -F'/' '/^ *origin/{if(!match($0, /(>|master)/)){print $2}}' |
    xargs git push origin --delete
  2. @schacon schacon created this gist Apr 26, 2011.
    7 changes: 7 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    $ git branch -r --merged |
    grep origin |
    grep -v '>' |
    grep -v master |
    xargs -L1 |
    awk '{split($0,a,"/"); print a[2]}' |
    xargs git push origin --delete