Unity not Version Controlling Inspector Settings for GameObjects

I am working on a Unity project within a team and naturally, we use Github for version control.

Unfortunately we have a problem where inspector settings aren’t being Version Controlled, this results in all of our GameObjects losing their outlets to Scripts and all connections are lost whenever we switch branches.

When working on something we would connect objects to scripts and get something like this:

Connected

But then when we switch branches we get this, and have to reconnect everything:

Disconnected

This is very annoying as the project continues to grow!
We have two gitignore files, one at the root level of the project:

RootIgnore

And one in ./Project

ProjectIgnore

There are others lying about, but I don’t think they are effecting the Project folder (where the Unity project exists in) in any way…

I personally thought Project/Library/assetDatabase3 was the file that stored the inspector settings, but I was wrong.

Any help greatly appreciated.

It looks like you are ignoring .meta files in your first .gitignore. Per the documentation, these must be versioned. Unity maintains references to the MonoScript assets (or really all references to all UnityEngine.Objects) using the guids defined in these files.