mirror of
https://github.com/github/gitignore.git
synced 2024-12-29 02:35:08 +08:00
85147407e4
Many twelve-factor apps use environment variables rather than the built in Rails secrets mechanism to store secrets. The [dotenv](https://github.com/bkeepers/dotenv) gem is widely used for this purpose and allows environment variables to be loaded from the `.env` file. However, this file should not be committed to source control. This PR just adds the `.env` file to `.gitignore` so that these secrets aren't accidentally committed. In some rare instances, it may be required that this file is committed to source control so I've added it to the list of files that can be removed if the developer is ok with secrets being committed.
40 lines
767 B
Plaintext
40 lines
767 B
Plaintext
*.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 these rules if you are OK with secrets being uploaded to the repo
|
|
config/initializers/secret_token.rb
|
|
config/secrets.yml
|
|
.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
|