From da8f42a0c7707e84affcb258431c77d9ec3e069a Mon Sep 17 00:00:00 2001 From: David Trasbo Date: Sat, 10 Apr 2010 21:19:50 +0200 Subject: [PATCH] "git init" new apps --- .../rails/generators/rails/app/app_generator.rb | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index bb2a080..7db5b9f 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -71,7 +71,6 @@ module Rails::Generators def create_root_files copy_file "README" - copy_file "gitignore", ".gitignore" unless options[:skip_git] template "Rakefile" template "config.ru" template "Gemfile" unless options[:skip_gemfile] @@ -185,6 +184,13 @@ module Rails::Generators run "#{bundle_command} install" if dev_or_edge? end + def initialize_git + unless options[:skip_git] + git :init + copy_file "gitignore", ".gitignore" + end + end + protected def self.banner -- 1.7.0.3