Skip to content

Instantly share code, notes, and snippets.

@VerachadW
Last active June 5, 2017 04:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save VerachadW/8079e8ab8e9324395e7c to your computer and use it in GitHub Desktop.
Save VerachadW/8079e8ab8e9324395e7c to your computer and use it in GitHub Desktop.
Git cleanup local branches without when remote is gone.
# Original from http://stackoverflow.com/questions/17983068/delete-local-git-branches-after-deleting-them-on-the-remote-repo
delete-no-remote = "!git fetch --all -p; git branch -vv | grep \": gone]\" | awk '{ print $1 }' | xargs -n 1 git branch -D"
@travisdachi
Copy link

Or you can just install oh-my-zsh and type gbda

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