I can’t recall, is Perforce case sensitive or is this perhaps configurable? Just a thought because gitignore usually does it so that both common cases are ignored: [Bb]uilds
I also noticed that you ignore some folders under /Assets:
For something like user settings and AssetStore tools this should be fine. I’m not so certain about the SharedAssets. If these are being used somewhere within the project they should not be excluded. If they are not used they shouldn’t be in the project in the first place.
If on the other hand the project includes a script that pulls in “shared assets” from a common location then this might explain the one-time compile errors. Suppose the project opens without the (latest) SharedAssets. These supposedly get pulled in with a InitializeOnLoad(Method) attribute code but at this point compilation would already have completed and a missing or out of date SharedAsset script could cause the initial compile error.
Generally speaking: do you have any init-on-load code that modifies the project’s assets, or runs external processes like a batch script that may modify the contents under /Assets?
Even more curious is the exclusion of the StreamingAssets folder. If you use StreamingAssets then this should be under source control. It is definitely not, as the comment indicates, a “build temp dir”!
Only exceptions I see is if you use StreamingAssets to store large videos (or other large files) that are optional and only needed in a build. In that case, I would prefer excluding specific files or a subfolder rather than all of StreamingAssets because it may eventually get used for other purposes too, eg a config file.