Created
July 16, 2017 17:40
-
-
Save alejandrofloresm/4c3b15d3731aa4b3fc4f3a9b99be44de to your computer and use it in GitHub Desktop.
Delete your local branches that are not on the remote.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shows the branches that should be deleted | |
# Resource: https://kparal.wordpress.com/2011/04/15/git-tip-of-the-day-pruning-stale-remote-tracking-branches/ | |
git remote prune origin --dry-run | |
# Deletes the branches | |
git remote prune origin | |
# It can also be done with fetch | |
git fetch origin --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment