My local branch is mapped to a remote one:
fetch = +refs/heads/release/old_branch:refs/remotes/origin/release/old_branch
I'd like to rename both local and remote old_branch
into new_branch
. w3docs recommends this:
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
However, there are a couple other developers who are also working on the same remote old_branch
as I do. Is the above recommendation safe in collaborative environment? If their .git/config
has lines similar to mine above, wouldn't this sequence confuse their fetch references?