![]() This can be easily done with git branch -set-upstream-to=origin/beta some-local-branch Then, they need to set up all the branches that are using origin/feature to use origin/beta as their upstream. If they want to delete the local one, they need to run git branch -D feature. That won't delete their local feature branch, if they have one (I for one do not create local branches for shared branches). It shouldn't be too difficult for them to correct the situation.įirst, they should fetch with -prune so that the remote feature branch goes away from what they see about the remote: git fetch -prune origin # or adjust to the remote that each one likes to name it I hope your team was in sync about this branch renaming. Luckily the person I'm working on this project with had no work in progress/staged changes on feature, but if he had, where would those have gone, considering his machine is unaware of the branch rename, and would have attempted to push it to remote on the old name?.What's the best way to tell other people that a branch has been renamed and they should update it on their local machines as well?.When they run git pull, they're getting the message "Your configuration specifies to merge with the ref 'refs/heads/feature' from the remote, but no such ref was fetched." When they run git branch they see master and feature listed. Now my local machine and GitHub are all synced up, but someone else working on their remote machine still has the feature branch. Pushed the beta branch and reset the upstream On my machine, I renamed feature with the following steps: I had a repo with the branches feature and master.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |