Monday, July 02, 2007

Adding a New Rails Project under Subversion

I generally use Subversion for source control when given the choice. In day to day usage, I like to use Tortoise SVN as it gives you a GUI with tick boxes for files to check in. However, it's handy to use the command line tool for project setup and automation.

Often, there is a subversion repository already set up and running on another machine. In this situation, I generally:
  1. Check out the repository at the top level into a temporary directory through Tortoise, add a new directory ([appname]) for the new project, and check it in.
  2. Generate the new rails app (rails [appname]).
  3. Check out [appname] from the repository into the local directory [appname] which contains the Rails project.
  4. Add and check in all files through Tortoise.
  5. Run the following commands from the command line to remove logs and tmp from the repository:

svn remove log/*
svn commit -m "removing all log files from subversion"
svn propset svn:ignore "*.log" log/
svn update log/
svn commit -m "Ignoring all files in /log/ ending in .log"
svn remove tmp/*
svn propset svn:ignore "*" tmp/
svn update tmp/
svn commit -m "Ignoring all files in /tmp/"

There's more Rails/Subversion info to be found on the Rails wiki.

205 comments:

«Oldest   ‹Older   201 – 205 of 205
Joomla developer said...

The post is written in very a good manner and it details many useful information for me. I am happy to find your distinguished way of writing the post.

carpet cleaning darlinghurst said...

I will keep visiting the blog section of this very often.Great, I think that covers everything.

Text The Romance Back Reviews said...

Great share, thank you for share.
Have a great day.

love game said...

as there may be much less Cheap RS Goldwork in digesting what is transformed in between repository release quantities and regardless of whether it applies for the subtree. Anyway, it is straightforward enough to split/merge repositoriesSell Rs Goldwith svnadmin

Jerry Gene said...

Nice post! Can’t wait for the next one. Keep stuff like this coming. Nice Post keep it up.

Asus - N55SL-DS71 15.6" LED Notebook - Intel Core i7 i7-2670QM 2.20 GHz - Black

Asus - 11.6"ZENBOOK Ultrabook 4 GB Memory and 128 GB Solid State Drive - Aluminum Silver

Asus - 13.3" Laptop - 4GB Memory - 128GB Solid State Drive - Hot Pink

Asus - 11.6" Laptop - 4GB Memory - 128GB Solid State Drive - Radiant Silver

Asus - 15.6" Notebook 8 GB Memory - 500 GB Hard Drive - Black

«Oldest ‹Older   201 – 205 of 205   Newer› Newest»