Which Visual C++ file types should be committed to

2019-01-15 23:42发布

Which Visual Studio \ Visual C++ file types should be committed to version control?
In my project I have the following file types:

aps
cpp
exe
filters
h
ico
idb
ipch
lastbuildstate
lib
log
manifest
obj
pch
pdb
rc
rc2
res
sdf
sln
suo
tlog
txt
user
vcxproj

I would greatly appreciate a short reasoning for each. If any of them are controversial, please note it. I'm intentionally including even trivial file types for completeness.

EDIT

On one hand I would like to be platform independent in the future. On the other hand in the near future I would like to work with team members with similar setups. Folder compatibility between the setups is certainly an option, so configuration files holding paths may be included if it eases the workflow.
Again, I would surely appreciate an explanation what's what.

8条回答
三岁会撩人
2楼-- · 2019-01-16 00:31

Contrary to what was stated in an earlier answer, I would like to point out that it appears to be important to version control the .opt file in order to keep track of user options. See reference below:

https://msdn.microsoft.com/en-us/library/aa278994(v=vs.60).aspx

查看更多
Summer. ? 凉城
3楼-- · 2019-01-16 00:42

From your list I'd choose those:

cpp
filters
h
ico
manifest
rc
rc2
sln
txt
vcxproj

Generally, you should version all files necessary to build the project. Automatically generated files should not be archived imho.

查看更多
登录 后发表回答