


prune option didn't seem to help either. On a suggestion in one answer here, I tried git push remote :branch that didn't seem to help. Git servers might allow you to rename Git branches using the web interface or external programs (like Sourcetree, etc.), but you have to keep in mind that in Git all the work is done locally, so it's recommended to use the above commands to the work. However, the locally deleted branch is not deleted on remote repo (on github). It will rename the remote with the given name to the new name, but in your case, it did not find any, so the renaming failed.īut it will not do what you think it will rename your local configuration remote name and not the remote branch.
Git delete branch locally and remotely update#
Git remote rename is trying to update your remote section in your configuration file. When you use the git branch -m (move), Git is also updating your tracking branch with the new name. # Reset the upstream branch for the new_name local branchĬredit: ptim # In this option, we will push the branch to the remote with the new name # Otherwise, git will use the old upstream name instead of. # Prevent git from using the old name when pushing in the next step. # Or shorter way to delete remote branch # Delete the old branch on remote - where is, for example, origin Renaming local and remote # Rename the local branch to the new name Push the branch to remote with the new name while keeping the original name locally.Change your local branch and then push your changes.
