I setup a specific branch for 2 developers to code on.
Visually in visual studio it appears they are connected to the same branch
But I have discovered that they are infact working on separate branches
The branch tooltip shows that the tracked branch are different between the 2 of them, even though they are connected to the same branch name
This screenshot shows the sprint3 branch (by name) is tracked to the sprint3 branch
https://i.sstatic.net/H0oZa.jpg
This screenshot shows the sprint3 branch (by name) is tracked to the master branch
https://i.sstatic.net/NbGZB.jpg
How would I update the 2nd screenshot to point to the correct branch, so that all the code changes are together in a single branch?
Solved: I was able to fix the issue by opening the git config file and changing the branch merge pointer to the correct location
I was able to fix the issue by opening the git config file and changing the branch merge pointer to the correct location
That's not how Git works. Once people clone the repo, they can do whatever they want within the repo. It's only when they attempt to push changes that you can control whether they're permitted to do so, or not.
It looks like two people cloned the repo, and one person created a local branch called "sprint3" pointing to the "sprint3" remote branch. In another case, they created a local branch called "sprint3" pointing to the "master" remote branch.
Assuming they haven't pushed changes yet, the person who has a local "sprint3" branch pointing to "master" on the remote can update their tracked branch:
git branch branch_name --set-upstream-to <remote>/<CorrectBranch>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With