Skip to content

Instantly share code, notes, and snippets.

@fabienjuif
Last active May 30, 2018 08:40
Show Gist options
  • Select an option

  • Save fabienjuif/6260958b11afe76042ef67bb6e7962d7 to your computer and use it in GitHub Desktop.

Select an option

Save fabienjuif/6260958b11afe76042ef67bb6e7962d7 to your computer and use it in GitHub Desktop.
clean local branches
git branch -vv | awk '{print $1}' | grep -v HEAD | grep -v master | grep -v '*' | xargs git branch -d --force
git branch -vv | awk '{print $1}' | grep -Ev 'HEAD|master|*' | xargs git branch -d --force
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment