Skip to content

Instantly share code, notes, and snippets.

@jabranr
Created February 3, 2016 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jabranr/8483bcd3cc49c68860b0 to your computer and use it in GitHub Desktop.
Save jabranr/8483bcd3cc49c68860b0 to your computer and use it in GitHub Desktop.
Delete a Git branch locally and remotely
# Delete a Git branch locally and remotely
# Author: Jabran Rafique <hello@jabran.me>
# License: MIT License
#!/bin/bash
# Display all local branches
git branch
# Delete a local branch
git branch -d {BRANCH_NAME}
# Delete same branch in remote
git push origin --delete {BRANCH_NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment