Last active
December 15, 2016 12:23
-
-
Save sharat/4bf2a5f3f34d326436383c3d6793e90a to your computer and use it in GitHub Desktop.
When you local repository fails to remove invalid remote referneces
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
# The symptoms. When you do this, you keep on getting new and deleted branches all the time | |
git remote update | |
git pull | |
# Symptom 2 (for obvious reasons). | |
git branch -a --merged # Check the merged branches | |
git push origin --delete [branch name] # this complains remote doesn't exist | |
# The remedy | |
git remote prune origin # Remove all the stale references from remote |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment