To delete a branch and recreate it, both locally and remotely, here is a short shell script that asks for user confirmation and then proceeds to recreate the branch from master. In this example, the branch is development, the confirmation message is colored red to emphasize precuation, and the script only proceeds once user types exact yes.
When you purchase through links on techighness.com, I may earn an affiliate commission.