Skip to content

Instantly share code, notes, and snippets.

@RockyRx
RockyRx / rename_git_branch.bash
Last active March 21, 2019 11:33
Renaming a GIT branch - local and remotly
git branch -m <old_name> <new_name> #1
git push origin --delete <old_name> #2
git branch --unset-upstream #3 - This step is required since GIT is still holds pull/push merge configuration with the old branch.
git push --set-upstream origin <new_name> #4