Skip to content

Rails Tip: Automatically adding generated files to Subversion

Try this in a subversion-controlled rails project:

script/generate model –svn MyModel

I just learned that adding the `–svn` or `-c`, if you prefer, will actually `svn add` the generated files for you!

6 Comments

  1. pau wrote:

    I get a “Couldn’t find ‘–svn’ generator ” message. -c produces the same results.
    Any idea what it could be?

    Posted on 30-Jan-06 at 8:32 pm | Permalink
  2. I had the same problem when I tried to auto add my generated migration to svn. this worked, though:

    ./script/generate migration –svn name_of_my_super_sweer_migration

    I assume that will make it work for the other generators, though I haven’t tried it

    Posted on 24-Feb-06 at 11:44 am | Permalink
  3. okay, the comment post stripped a bunch of characters out, let me see if I can try this again:

    “./script/generate migration –svn set_time_defaults_for_users_users_to_nil”

    Posted on 24-Feb-06 at 11:46 am | Permalink
  4. okay, just to clarify, there are two ” - ” behind the svn option, you can figure it out. (should look like ” - -svn”)

    Posted on 24-Feb-06 at 11:48 am | Permalink
  5. Hannes wrote:

    I\’m love this great website. Many thanks guy

    Posted on 29-Aug-08 at 7:09 pm | Permalink
  6. Emm.. I appreciate your comment about my slimy pillow Wanna good joke? What is Beethoven doing in his coffin right now? Decomposing.

    Posted on 26-Oct-08 at 3:57 pm | Permalink

Post a Comment

Your email is never published nor shared. Required fields are marked *
*
*