I am working on a small project, hosted on Google Code, using SVN for source control. This is my first time using source control, and I'm a bit confused about what I should actually be committing to the repository. My project is very simple: A Class Library project, written in C#. The actual code that I have written is a single file.
My question is this: Should I be committing the entire project (including directories like Debug, Release, Properties, etc.) or just my main .cs file?
After fighting with Subversion for a while (note to self: do not reset repository), it looks like I finally have it working with the directories laid out properly.
csproj" is a Visual Studio . NET C# Project file extension. This file will have information about the files included in that project, assemblies used in that project, project GUID and project version etc. This file is related to your project. It will be automatically generated when we create .
You should commit everything but your output files.
This means commit everything except for your \bin
and \obj
directories (and the files in them).
For ordinary development I don't commit:
Everything else I commit. For a release that will be sent to a customer I also commit the exact binaries that I sent.
You should include everything required to build the project, not anything that the project produces since someone recompiling it will be able to produce those by compiling.
In the case of a C# project that is your solution file (.sln), your project file or files (.csproj), and your source files (.cs) and any resource files (.resx, *.bmp, *.png, etc.). That does include the files in the Properties folder, because those contain global settings for your project.
You do not commit anything in the Debug/Release, those are outputs of building your project. As a rule of thumb, you don't commit binary files (*.dll, *.exe).
As a test if you have committed enough, check out the source to a different directory on your computer and attempt to rebuild the project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With