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.

  1. 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): enter image description here

  2. 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.

  3. 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).
  4. after that, have watched history , changes in central repository (gitlab) , have seen commit merge second guy: enter image description here

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:

  1. is correct behaviour? expect see in merge commit string "visualstudioversion = 14.0.23107.0" changed "visualstudioversion = 14.0.24720.0".
  2. how can achieve behaviour in can see changes?

  1. 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.

  2. i suggest not committing changes master. create separate local branch , use pull requests master.

look using git branching strategy keep branches orderly.

git branching model


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -