Reputation: 1495
I am starting a Rails 3.2 application. I am using Git for my respository, and wanted to know which files I should keep versions of, and which files I should generate on the fly from command operations.
Specifically:
config/routes.rb
db/migrate/*
db/schema.rb
lib/assets/*
lib/tasks/*
script/rails
test/performance/browsing_test.rb
tmp/*
vendor/assests/*
vendor/plugins/*
Any others I should be aware of?
Upvotes: 0
Views: 602
Reputation: 5973
This is our current .gitignore file:
!spec/javascripts/generated/lib
*.swo
*.swp
.DS_Store
.bundle
.project
.sass-cache/
config/*.sphinx.conf
config/database.yml
coverage/*
db/*.sqlite3
db/*.sqlite3-journal
db/sphinx
log/*
public/assets/
public/javascripts/compiled/*
spec/javascripts/generated/*
tmp/*
Upvotes: 2
Reputation: 301327
In the list, everything except tmp
has to or can be tracked in the repo.
See here for a standard .gitignore for Rails: https://github.com/github/gitignore/blob/master/Rails.gitignore
Once you add such a .gitignore to your repository, you can rest assured that files that need not be tracked and those that are generated are not added to your repository accidentally.
Upvotes: 5