Help with Merge conflicts that shouldn't exist

Hello,

I have been using github.com with githubdesktop, and now gitlab for quite some time now. My main usage has been for game development with Unity.

Overall I am pretty familiar with general ebb and flow of things. However I keep running into some really goofy issues with Unity meta files and merge conflicts.

For example I am trying to merge two branches, and one branch doesnt even have one of these files on it that is apparently " a conflict" .

The file is " BattleRoundEnd.asset.meta "

it does not exist on branch Stone.
It does exist on branch Main.

When pulling into Stone, we get a conflict, and upon opening the file it shows this:

Here is the meta file opened as a text file,

<<<<<<< HEAD:Assets/GameFiles/Terrain/Terrain Data/MicroSplatData.meta
guid: d9ea83f75a34bd24c89e144b2bcdc7af
folderAsset: yes
DefaultImporter:
=======
guid: 568b22bce048ce04f8157c9f14717113
NativeFormatImporter:
>>>>>>> main:Assets/EventWindow_DO_NOT_EDIT/Events/BattleRoundEnd.asset.meta
  externalObjects: {}
  mainObjectFileID: 0
  userData: 
  assetBundleName: 
  assetBundleVariant: 

as you can see they are referencing two different locations/.meta files??? it doesnt make sense:
Assets/GameFiles/Terrain/Terrain Data/MicroSplatData.meta
Assets/EventWindow_DO_NOT_EDIT/Events/BattleRoundEnd.asset.meta

So with the 2 paths, its like git is somehow thinking this file is the same as another file in a totally different path and generating a conflict that makes no sense to me?

Most posts I can find online surrounding this issue suggest that either two people checked in the same file, or 1 person checked in the file but somehow didnt commit the .meta file. I have verified both of these are not true.

Unity tends to involve large files. And large files are often handled by the git lfs extension which Iiuc relies on hashes. I’d check to see if those two files at times were, e.g. empty.

You might be tripping on a rename detection or similar from some point in your branch history.

Thanks for the reply, indeed i am using lfs for this repo.

what does liuc stand for? tried googling

I understand that the guid on the meta files are hashes, and it is possible to have rare collisions there, but as u can see the file has two different guids, so the conflict isnt with the guids. Are you saying that git itself has its own hashes, and these are just colliding for whatever reason behind the scenes? how can I prevent or futz with this?

I’d check to see if those two files at times were, e.g. empty.

Not sure what you mean, the file in question only existed on one of the branches, and it was not empty?

This was the meta file previous to the conflict :

fileFormatVersion: 2
guid: 568b22bce048ce04f8157c9f14717113
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

Sorry, lfs is something I avoid. Good luck

Alright thanks,
this was happening before LFS and on projects that have never been LFS tho.
Seems to be a UNITY + GIT thing