Which Visual C++ file types should be committed to version control?

后端 未结 8 965
我寻月下人不归
我寻月下人不归 2020-12-02 03:59

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         


        
相关标签:
8条回答
  • 2020-12-02 04:25

    The other answers are excellent; I just thought I'd contribute a useful little tool. Check out the Visual Studio .gitignore template on GitHub. It's a nice actively maintained list of files that are commonly kept out of version control.

    And while you're at it, the whole gitignore repository is a very useful resource for all sorts of development from ActionScript to Zend. If you don't use Git, you can still use the gitignore files as a reference.

    0 讨论(0)
  • 2020-12-02 04:29

    In general, you should add all files which appear in the Solution Explorer to version control. In addition, you need to include the .sln (solution file) and .vcproj/.vcxproj/.vbproj/.csproj files (project file).

    Note that if you have a source control plugin for Visual Studio, such as TFS or AnkhSvn, there is no need to explicitly care about this. Visual Studio knows which files need to be in version control and gives the data to the source control plugin. Only if you use an external tool (ex. TortoiseSVN) do you need to have such a list.

    0 讨论(0)
提交回复
热议问题