0

To my understanding it is only necessary to add files you work with once or regularly into the trunk. It seems wasteful and bulky to add files that never get touched to the trunk. Is this logic correct? And then if I eventually want to touch one of those files I can easily add it later on?

Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
  • 1
    Example? You add all files that your program needs to compile all artifacts (binaries, docs, embedded porn, whatever), and no others. For words about anything else, we need more detail. – thiton Jan 19 '12 at 16:00
  • +1 for finding a way to incorporate porn! @JB Nizet gave a great answer. – Jared Eitnier Jan 19 '12 at 16:06
  • Thanks, but the question with the "Example" wasn't rhetorical :-). JBNizet's answer is good, and might help you. Your question, however, would be much more informative with a concrete example - name a few files you would want to know about. – thiton Jan 19 '12 at 16:08
  • Heh...Well, using Magento for instance. I have no need for the Media folder; I won't ever edit it. So I would think to exclude that from the repo. The app/code/local folder I would obviously want because that's got all my custom modules. – Jared Eitnier Jan 19 '12 at 16:16
  • See this http://stackoverflow.com/q/1880817/198011 – Antonio Pérez Jan 19 '12 at 16:57
  • The only corollary to some of the advice give here is if you depend on third party code, then you can choose to add that to your own repository, or if the situation permits, use `svn:externals` to checkout a third-party repository (including your own). Otherwise, all good advice: ensure a clean trunk checkout results in something that completely describes and builds your project. – Barry Jan 19 '12 at 17:16

3 Answers3

3

The rule of thumb is: anyone must be able to start from scratch, with a brand new computer, install the various development tools (compiler, IDE, database, etc.), checkout the trunk, and build the latest version of the project. All your sources go in the repository, except the sources that are automatically generated from other artefacts.

JB Nizet
  • 678,734
  • 91
  • 1,224
  • 1,255
1

Best practice is to store a complete project your preferred source control system. You got i right when a complete new team member can checkout and start working without a single extra step of setup. To accomplish that you need to store ALL source code and all dependent libraries etc.

Glenn
  • 1,955
  • 2
  • 15
  • 23
1

You want to put into Subversion everything that defines you application. This way you will be able to build your project from what is in version control. This way you will be able to go back in time to see how your application was configured at any point in the past, this will save your butt someday.

Don't worry about storage. Subversion is very efficient. When you do a copy ("branch") in Subversion it only copies the directory and still points to the original files until they are changed. If they do never change then you will only have one copy.

Disk is cheap, your time and the time is expensive. Make it as easy as possible to build your project and to time travel. You will not regret it.

Victor
  • 3,395
  • 1
  • 23
  • 26