Categories
Computers Linux Mac

Version control a Rails application with SVN

I have been looking at Git for version control but so far I am using SVN. Whenever I set up a new Rails application and add it to my version control system I do the following to ignore files that should not be version controlled.

  1. Copy the entire project to a folder within my SVN working folder hierarchy
  2. Remove all superfluous files:

  3. rm tmp/*/*
    rm log/*
    rm `find . -name '.DS_Store'`
    rm `find . -name '*.sqlite3'`
    rake db:migrate VERSION=0

  4. Add all files (svn add *)
  5. Set properties on the Rails folders to ignore certain files

  6. svn propset svn:ignore "*.log" log/
    svn propset svn:ignore "*" tmp/sessions tmp/cache tmp/sockets
    svn propset svn:ignore "*.rb\n*.sqlite3" db
    svn propset svn:ignore ".DS_Store" .

  7. Make an initial commit (svn ci -m “Initial import”)
css.php