Examples for .getignore, .gitigore and .gitattributes are atached.
From the main menu under Edit, Project Settings and then Editor set the Version Control Mode to Visible Meta Files and Asset Serialization Mode to Force Text.
Use the following templates from github.com/github/gitignore:
If it is not assured, that every project member has its Git installation configured to ignore operating system specific files, you might want to include these:
Auto detect text files and perform LF normalization:
* text=auto
Higher probability of success rates while merging C# files:
*.cs text diff=csharp
Use Git Large File Storage and track the following files as a starting point:
.assets.bmp.tiff.tif.tga.jpg.jpeg.png.psd.tga.mp3.ogg.wav.aiff.aif.mod.it.s3m.xm.mp4.mov.ttf