5

At the moment I check in all my files (including dll's, VS solution files, images, etc). I often need to checkout these files to a staging server or to a another developer and so having these files there means the project is setup there all ready to go.

Whats the best practice here?

EDIT: If I don't add the generated files like the dll files how do I ensure they are present when updating the staging server?

1

6 Answers 6

4

I usually only checkin files that are not generated - so source, config files, project files, but not object files - dll's exe's jar's etc.

2

In terms of project files, don't check in the ".csproj.user" files, or ".suo" files.

Also, nothing in the "bin" and "obj" folders.

1

If everyone is using the same IDE - check in the project files as well. It helps with having proper formatter settings, build settings, etc. If that's not the case (for an open source project, for instance), just leave the code and the needed build files. Nobody cares what IDE you're using.

Also leave out everything that is compiled or generated. Instead, make sure your build process does that when it's needed.

I love the way Maven handles this stuff . I Just check out the project, which contains only source and no dependencies and if I want to import it into eclipse, all I have to do is run mvn eclipse:eclipse and all is set up for me. If I want to get rid of the eclipse-specific junk, I run mvn eclipse:clean. The same is true for other IDE's.

0

I check in everything that is part of the project or is a dependancy of the project, including but not limited to assemblies it is dependant upon, SQL Scripts to generate the db and test data, unit tests, docs, diagrams, pretty much anything else a dev would need. As far as what I dont include is dll's that will be generated, pdb's and xml comments that are generated with the project/solution.

As a sidenote though, there is an exception. SOme projects may require someone to have access to the solution but may not be able to compile/build it. In those cases, depending on what the project is, I may include the latest build binaries.

0

I only check files that are needed to compile the project in other computer that includes .lib or even dll but not precompiled headers or per-user files that fills the repository with garbage

0

Any generated file (compiled, or release tarballs etc) should be checked in to a different area of the version control system by the build/release mechanism.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.