Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

git rename branch and force push

git checkout <old_name>
git branch -m <new_name>
# reset upstream branch if old branch is already pushed
git push origin -u <new_name>
git push origin --delete <old_name>
 
PREVIOUS NEXT
Tagged: #git #rename #branch #force #push
ADD COMMENT
Topic
Name
8+1 =