mfvbhg
Last Updated: October 26, 2017
·
139
· dawsonbotsford
Myface

Remove git branch locally and on remote

You've just merged a branch on git. You should delete that branch now:

# Usage: "$ burn <feature branch>"
burn() {
  git branch -D "$1" # Delete branch locally
  git push origin :"$1" # Delete branch from remote (GitHub)
}

Just throw this in your ~/.bashrc, ~/.zshrc, etc. and start burning your branches today!

If that feature branch was named dopeNewFeature, you'd simple enter $ burn dopeNewFeature when in master.

Say Thanks
Respond

2 Responses
Add your response

28124

(y)

over 1 year ago ·
29040
Vgv5l

I set this up a long time ago and named it nuke

6 months ago ·
Filed Under