Skip to content

Instantly share code, notes, and snippets.

@dgoguerra
Created September 8, 2016 13:59
Show Gist options
  • Star 12 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save dgoguerra/c0149ab071a2bed389266ec89ff62535 to your computer and use it in GitHub Desktop.
Save dgoguerra/c0149ab071a2bed389266ec89ff62535 to your computer and use it in GitHub Desktop.
Prune branches and tags deleted in the remote
# prune branches deleted in origin
git remote prune origin

# prune tags
# http://stackoverflow.com/questions/1841341/remove-local-tags-that-are-no-longer-on-the-remote-repository
git fetch --prune <remote> '+refs/tags/*:refs/tags/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment