Unity and git - issue with constantly modified prefabs and scenes

We have been using git with Unity fairly successfully, but there is one annoying behavior we can’t seem to fix. Unity constantly modifies .scene and .prefab files even when no changes are made. Whenever Unity is opened or focused, it will modify several files even if we haven’t made changes or even opened the scene. We can commit the changes and Unity will modify them again. We end up having to constantly discard the changes otherwise we get merge conflicts - again even when neither of the committers have made any actual changes.

We have meta files and force text enabled. We have a good .gitignore. And we don’t attempt to merge these files normally in our git workflow.

Does anybody have any advice about this?

See this thread.

It’s not line endings, it’s usually UI components like content fitters and layout groups. Simply opening the scene runs layout scripts automatically. Various game UI positions and anchors can be modified by small amounts based on the size of your local scene viewer panel in the Unity editor.

I agree with people in the thread, this should be fixed. It makes merging and conflict resolution a major headache. In our team someone modified one simple setting in the inspector. This should have been one line change in the git commit, however there were hundreds of changes!