Created
September 4, 2024 19:33
-
-
Save jonasbn/bb46e6602b8c1cccf76343eaa0fd89e7 to your computer and use it in GitHub Desktop.
Basic script in my path to delete Git branches locally and remotely, since I always forgot the command structures
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
#!/bin/zsh | |
# REF: https://jonasbn.github.io/til/git/delete_local_and_remote_branch.html | |
echo "Deleting branch $1 locally" | |
git branch -d $1 | |
echo "Deleting branch $1 remotely" | |
git push origin --delete $1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment