Skip to content

Instantly share code, notes, and snippets.

@wilsonsilva
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save wilsonsilva/e66b327f6659cc3a36e9 to your computer and use it in GitHub Desktop.

Select an option

Save wilsonsilva/e66b327f6659cc3a36e9 to your computer and use it in GitHub Desktop.
Deletes all local branches that are already merged into master
#!/bin/bash
git branch --merged master | grep -v 'master$' | xargs git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment