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

丶灬走出姿态 提交于 2019-12-07 01:09:23

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/10259606/possible-implications-of-of-adding-sdf-files-to-gitignore

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!