Vic*_*tor 27 git ruby-on-rails heroku
在Heroku上使用Rails有什么好的.gitignore?
*.log
*.sqlite3
Run Code Online (Sandbox Code Playgroud)
还有什么?
Dan*_*vin 36
这非常类似于:Rails:从版本控制中排除任何内容?这是我的答案.
DHH刚刚在Twitter上发布 Rails 3 中将有一个默认的.gitignore,其中包括:
db/*.sqlite3
log/*.log
tmp/**/*
Run Code Online (Sandbox Code Playgroud)
这通常是我排除的.有些人还喜欢排除database.yml文件,如果它是在公共存储库上进行的,并且您不想公开数据库密码.
Sha*_*bov 11
https://github.com/github/gitignore/blob/master/Rails.gitignore
Run Code Online (Sandbox Code Playgroud)*.rbc capybara-*.html .rspec /log /tmp /db/*.sqlite3 /db/*.sqlite3-journal /public/system /coverage/ /spec/tmp **.orig rerun.txt pickle-email-*.html # TODO Comment out this rule if you are OK with secrets being uploaded to the repo config/initializers/secret_token.rb # Only include if you have production secrets in this file, which is no longer a Rails default # config/secrets.yml # dotenv # TODO Comment out this rule if environment variables can be committed .env ## Environment normalization: /.bundle /vendor/bundle # these should all be checked in to normalize the environment: # Gemfile.lock, .ruby-version, .ruby-gemset # unless supporting rvm < 1.11.0 or doing something fancy, ignore this: .rvmrc # if using bower-rails ignore default bower_components path bower.json files /vendor/assets/bower_components *.bowerrc bower.json # Ignore pow environment settings .powenv # Ignore Byebug command history file. .byebug_history
请记住,Heroku的slug编译器使用名为的文件具有非常相似的功能.slugignore.此文件语法与中的大致相同.gitignore.
所以你可以像往常一样继续工作(即:存储PSD文件,电子表格和其他常见文件),但在运行时在 Heroku 上删除它们以降低slug的大小(<20MB听起来不错).
| 归档时间: |
|
| 查看次数: |
19205 次 |
| 最近记录: |