Skip to content

Instantly share code, notes, and snippets.

@danielshir
Created November 1, 2015 13:21
Show Gist options
  • Select an option

  • Save danielshir/06f19845fdf894a804a0 to your computer and use it in GitHub Desktop.

Select an option

Save danielshir/06f19845fdf894a804a0 to your computer and use it in GitHub Desktop.

Revisions

  1. danielshir created this gist Nov 1, 2015.
    2 changes: 2 additions & 0 deletions useful.bash
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    # Useful command to delete remote branches that are merged to currently checked out HEAD
    git branch -a --merged | grep BAK | grep -v <CURRENT_BRANCH_NAMEHERE> | sed 's/[ ]*remotes\/origin\///' | xargs -I name git push origin :name