Skip to content

Instantly share code, notes, and snippets.

@donabrams
Created August 20, 2012 18:28
Show Gist options
  • Select an option

  • Save donabrams/3406467 to your computer and use it in GitHub Desktop.

Select an option

Save donabrams/3406467 to your computer and use it in GitHub Desktop.
GIT clean branches that have already been merged
alias cleanbr='!git branch -r --no-color --merged | grep -v \"/\\(master\\|develop\\|integration\\)$\" | sed \"s/\\// :/\" | xargs -L1 git push && git branch --no-color --merged | grep -v \" \\(master\\|develop\\|integration\\)$\" | xargs -L1 git br -d'
@donabrams
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment