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.
- Copy the entire project to a folder within my SVN working folder hierarchy
- Remove all superfluous files:
- Add all files (svn add *)
- Set properties on the Rails folders to ignore certain files
- Make an initial commit (svn ci -m “Initial import”)
rm tmp/*/*
rm log/*
rm `find . -name '.DS_Store'`
rm `find . -name '*.sqlite3'`
rake db:migrate VERSION=0
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" .