Last active
September 10, 2015 20:15
-
-
Save cdated/0d98b6dbd7ee5324591f to your computer and use it in GitHub Desktop.
Git branch cleanup
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
Rename branch | |
git branch -m <oldName> <newName> | |
Delete local branch | |
git branch -D <branchName> | |
Delete local and remote branch | |
git push origin --delete <branchName> | |
Delete remote reference from local repo | |
git branch -d -r origin/<branchName> | |
Delete all remote references that no longer exist on remote | |
git fetch -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment