bash - Git: merge hides certain changes -
we work through visual studio 2015 git. have had central repository (gitlab) single branch 'master'. 2 people have cloned repository.
first guy have added "test-new-file-v.txt" file in solution. have changed solution file (.sln) , have changed string "visualstudioversion = 14.0.23107.0". commit in local repository , push commit in central repository (gitlab). after that, have watched commit in central repository (gitlab):
second guy have added "testgit.txt" file in solution. have changed solution file (.sln) too, didn`t change string visualstudioversion. want pull central repository (gitlab) before push.
- second guy has had conflict. merge through visual studio 2015 , see different guy have made mistake in changing "visualstudioversion = 14.0.24720.0" on "visualstudioversion = 14.0.23107.0". second guy want leave string "visualstudioversion = 14.0.24720.0" unchanged. chose local state "visualstudioversion = 14.0.24720.0" string , make commit merge. after push 2 commits in central repository (gitlab).
- after that, have watched history , changes in central repository (gitlab) , have seen commit merge second guy:
we see in central repository (gitlab) solution file contains string "visualstudioversion = 14.0.24720.0" , correct, don`t see string replace string "visualstudioversion = 14.0.23107.0", because commit first guy contains string , before merge commit.
my questions:
- is correct behaviour? expect see in merge commit string "visualstudioversion = 14.0.23107.0" changed "visualstudioversion = 14.0.24720.0".
- how can achieve behaviour in can see changes?
i assuming didn't changes before commit on master branch, locally may not have change pushed. prevents code being reverted if branch out of date.
i suggest not committing changes master. create separate local branch , use pull requests master.
look using git branching strategy keep branches orderly.
Comments
Post a Comment