Firstly, the .gitignore files should exclude CodeGenerated files and Databases. It should also exclude any user uploaded files, generated xap files.
Databases could be added to Git but should be renamed first as YourDb_Sample.mdf
*/Generated_Code/ *.Web/App_Data/ *.Web/Upload/ ClientBin/ Mail/* obj/ Bin/ *.user *.suo
Doing these little steps will save many hours when pushing and pulling from shared repositories.
If the files have already been checked in, then the following can be helpful.
git update-index --assume-unchanged <filename>