I am using Google Code to host my C# project. It has a solution with one class library and one test project. I am using Visual Studio 2010.
The client I am using is TortoiseHG.
In Windows Explorer, first I cloned an empty folder and got the .hg files inside of it so that it is associated with my hosted code. Now, I created a new C# project and copies all files inside my root source code controlled folder. I will work on it hereafter.
When committing, there are lots of files and folders inside my solution folder and not all of them are code. Usually I just build and take out the EXE or DLL and never really bothered with other stuff. Now I feel not all files and folders are important for source code control.
I am really new to source control.
Which files/folders should go into source control, apart from the actual code files themselves?
Good question! The rule of thumb that I use is the following:
*.sln,*.csprojand other project files will change as well, these must be checked in.objdir and the*.suofile for instance) can be marked for the exclusion list.You may decide to include the built versions of the DLL or EXE, but this is not necessary, as anybody loading your project can built it. Now, the next step is:
If this last step works (and you should check it on a regular basis), you have a solid basis for your files.
Note: some tools support Visual Studio from within and know what files should or should not be included, i.e., for SVN I know that VisualSVN does a rather good job of skipping the unneeded files.
Two more rule of thumbs (oh, three, actually):
*.user(root of any project),\obj\**(all under the temporaryobj-folder),*.vspsccand*.vssscc(root of project),*.suoand depending on your preferences:\bin\**.PrecompiledWebdirectory to your solution, which you really don’t want to check in: exclude all here.EDIT: this question on SO has a very extensive list of files to ignore of Visual Studio.