Skip to content

Instantly share code, notes, and snippets.

@jonasbn
Created September 4, 2024 19:33
Show Gist options
  • Save jonasbn/bb46e6602b8c1cccf76343eaa0fd89e7 to your computer and use it in GitHub Desktop.
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
#!/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