linopolus
linopolus

Reputation: 93

how do I change the Rails3 standard .gitignore file

Hi
With Rails3 the rails new command creates a .gitignore file. As I have a few files from my editor that should be not committed, I don't want to add them to this standard gitignore file everytime I create a new rails application. How can I change the standard .gitignore file?

Upvotes: 1

Views: 681

Answers (2)

silvio
silvio

Reputation: 2294

You can edit the gitgnore-file in your railties-gem

$GEMHOME/gems/railties-3.0.3/lib/rails/generators/rails/app/templates/gitignore

But you must do it for every new version

Upvotes: 0

idlefingers
idlefingers

Reputation: 32047

Just create a global .gitignore file in your home folder and put your ignores for your editor files in that. You need to run this command to get git to pickup the global gitignore file:

$ git config --global core.excludesfile ~/.gitignore

Upvotes: 1

Related Questions