Why doesn't git merge some changes?

We ran into a weird git merge problem. We have 2 agreements (simplification below). PublicRepo is where we do most of the development, and from time to time, we push / merge changes into PrivateRepo.

https://github.com/suwatch/PublicRepo

https://github.com/suwatch/PrivateRepo

if we clone PublicRepo and make changes to kudu.web / kudu.web.csproj by deleting the bottom lines and commit.

<Reference Include="Microsoft.Json, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL"> <HintPath>..\packages\JsonValue.0.6.0\lib\40\Microsoft.Json.dll</HintPath> </Reference> 

When trying to pull / merge this change from PublicRepo → PrivateRepo, the autoserver simply ignored this change and did not delete anything. Try using different strings, it works (gets deleted properly). I wonder what could be the problem? Where to start the investigation? What do we need to do to fix this - besides the fact that every time we need to view all automatically combined files, we pull / merge?

Thanks!

+4
source share
1 answer

You have

 *.csproj text=auto merge=union 

in the .gitattributes file. A merge union will concatenate strings from all links.

+3
source

Source: https://habr.com/ru/post/1440234/


All Articles