Skip to content

Instantly share code, notes, and snippets.

@eckelon
Forked from daniDLL/git-clean-local-branches
Created June 19, 2019 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eckelon/24366b6c75d57b2b62de1482519315f7 to your computer and use it in GitHub Desktop.
Save eckelon/24366b6c75d57b2b62de1482519315f7 to your computer and use it in GitHub Desktop.
Git clean local branches that are not on remote anymore
git branch -vv | grep -E "desaparecido|gone" | awk '{print $1}' | xargs -n1 git branch -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment