Shell Script to Delete and Recreate a Branch From Master

Both locally and remotely

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.

[Read More]
When you purchase through links on, I may earn an affiliate commission.