Created
November 12, 2023 18:33
-
-
Save oclero/349fcc92ae2302a3d33eada7a3a868bb to your computer and use it in GitHub Desktop.
Remove a Git branch, local and/or 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
# Remove a remote branch. | |
git push <remote> --delete <branch> | |
# Remove a local branch. | |
git branch --delete <branch> | |
git branch --delete --force <branch> | |
# Remove a local tracking branch. | |
git branch --delete --remotes <remote>/<branch> | |
git fetch <remote> --prune |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment