Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Possible implications of of adding *.sdf files to .gitignore

I recently pushed a Visual Studio C++ project to github. I've noticed that VS creates a .sdf file that's relatively large (~25MB). I tried deleting this file in my workspace to see whether or VS would throw an error. Upon open the project in VS no errors where reported and it the file was recreated. I'm considering, therefore, removing the .sdf file that's currently in my repository and adding an *.sdf entry to the repo's .gitignore file.

The consequence of this is that when a user pulls the contents of the repo and opens it in Visual Studio for the first time, VS will have to generate the .sdf file. However, if a user pulls changes from the repo made by another user, could the .sdf get out of sync, and if so, does anyone know if VS would handle this in a sensible way (e.g. regenerating the .sdf file)? Could there be other implications that I'm not aware of?

Any input would be much appreciated!

like image 912
Dan Stevens Avatar asked Apr 21 '12 14:04

Dan Stevens


1 Answers

It looks like *.sdf are usually included in .gitignore files,; as illustrated in ".gitignore for Visual Studio Projects and Solutions", but also on the GitHub gitignore project.

One potential effect can be regarding some local modifications being overriden: see "Local Data Cache Sync does not save client changes to sdf file".

But other than that, ignoring cache file from a source control repository is a good practice.

like image 102
VonC Avatar answered Sep 21 '22 05:09

VonC