开发者

how do I change the Rails3 standard .gitignore file

Hi

With Rails3 the rails new command creates a .gitignore file. As I ha开发者_Go百科ve 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?


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜