1

When I created a C++ console project in Visual Studio, I found that besides .cpp files, I had other files like .sln, .vcxproj, .filters, .user.

Should I add them to Git repo?

informatik01
  • 16,038
  • 10
  • 74
  • 104
DeadNerd
  • 57
  • 2
  • 1
    Does this answer your question? [Which Visual C++ file types should be committed to version control?](https://stackoverflow.com/questions/3922660/which-visual-c-file-types-should-be-committed-to-version-control) – Asteroids With Wings Feb 15 '20 at 11:59
  • With `CMake` and out of source building I put all generated files (including the Visual Studio project files) in a separate folder tree so they don't end up in my repositories. I do have the `CMakeLists.txt` in the repository so the visual studio (or other IDE's) project files can be generated on a different system. – drescherjm Feb 15 '20 at 12:30

1 Answers1

3

You can download a .gitignore for Visual Studio. It will make sure only what's necessary to open and work on the project would be tracked, the rest would be ignored.

You can download one from here:
https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

informatik01
  • 16,038
  • 10
  • 74
  • 104
DaCurse
  • 795
  • 8
  • 25