Which files should I include in .gitignore when using Git in conjunction with Visual Studio Solutions (.sln) and Projects?
Probably this is the easiest way. In Visual Studio 2017,
Step 1: First right click on the solution file
Step 2: Then, select 'Add solution to source control'.
See the following image:
The following files will be added to your source folder.