Skip to content

Configuration files

ronalchn edited this page Jan 25, 2012 · 1 revision

There are some configuration files that may be different on development machines. Notably, config/database.yml may have local database settings. The file config/environment.rb may also specify that the configuration is 'development'.

So that git does not commit or checkout these files, you can run: git update-index --assume-unchanged config/database.yml config/environment.rb

Subsequently, these files will be assumed to be unchanged, and checking out different branches will not restore these files. However, if the changes to these files are committed, checking out the commit will fail.

If the files need to be committed or checked out, you can run the following command on the files: git update-index --no-assume-unchanged

Clone this wiki locally