We work through the visual studio 2015 with git. We have had central repository (GitLab) with single branch 'master'. Two people have cloned repository.
First guy have added "test-new-file-v.txt" file in the solution. It have changed solution file (.sln) and have changed string "VisualStudioVersion = 14.0.23107.0". Then he commit in your local repository and then push this commit in central repository (GitLab). After that, we have watched this commit in the central repository (GitLab):
Second guy have added "testgit.txt" file in the solution. It have changed solution file (.sln) too, but didn`t change string VisualStudioVersion. Then he want to pull central repository (GitLab) before push.
We see that in the central repository (GitLab) solution file contains string "VisualStudioVersion = 14.0.24720.0" and this is correct, but we don`t see that this string replace string "VisualStudioVersion = 14.0.23107.0", because commit from first guy contains this string and be before merge commit.
My questions:
I am assuming he didn't get your changes before his commit on the master branch, so locally he may not have a change that would be pushed. This prevents code being reverted if your branch is out of date.
I would suggest not committing changes to master. Create separate local branch and use pull requests into master.
Look into using git branching strategy to keep your branches orderly.
Git Branching Model
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