Browse files

Added default .gitignore (this is just recognizing Git market share, …

…don't throw a hissy if you use another SCM) [DHH]
  • Loading branch information...
1 parent f095e6f commit a642edbef31fe96fad488accf0052653c573e8db @dhh dhh committed Dec 28, 2009
@@ -1,5 +1,7 @@
+* Added default .gitignore (this is just recognizing Git market share, don't throw a hissy if you use another SCM) [DHH]
* Added cookies.permanent, cookies.signed, and cookies.permanent.signed accessor for common cookie actions [DHH]. Examples:
cookies.permanent[:prefers_open_id] = true
@@ -49,6 +49,7 @@ def create_root
def create_root_files
copy_file "README"
+ copy_file "gitignore", ".gitignore"
template "Rakefile"
template ""
template "Gemfile"
@@ -0,0 +1,3 @@

12 comments on commit a642edb


I'm using a gem for that, called git-rails. But I guess this gives people who don't know the gem a break.


This comment is gold!




The default gitignore is good. Shouldn't it include database.yml too? Or would that depend on the generator creating database.yml.example instead?


What about schema.rb? /me ducks


Don't you think about seed .gitignore with pretty default settings?


dcrec1 commented on a642edb Dec 28, 2009

I dont think config/database.yml should be in the .gitignore. Depending of the project, it's ok to version and to share database configurations, as when using sqlite3 for development, for example.

lackac commented on a642edb Dec 28, 2009

Things like .DS_Store, *.swp, and whatnot should go to your personal .gitignore file at ~/.gitignore


Might be nice to take this a step further:

  • only invoke this behavior when requested e.g. you're a Git user
  • add .gitignore files to directories like 'log' which start out empty
rails commented on a642edb Dec 28, 2009

greatseth, market share would dictate that, if anything, the option should be to opt-out, not opt-in. Yeah, probably good idea with something in the empty directories.


If you're going to put keeper files in empty directories, which is probably a good idea, please name them .gitkeep instead of .gitignore. Overriding the name .gitignore is just confusing, and it's also exactly the opposite of what you want to accomplish.


I think Rails creates those directories anyway. FileUtils#mkdir_p and what not.

Please sign in to comment.