Search code examples
ruby-on-railsgitgit-svn

Files in gitignore


I have a repository with a rails app in the production Server.

In the repo there is the .gitignore file:

...
    config/database.yaml 
...

Every developing client have a cloned repo with different config/database.yaml.

My problem is this:

database.yaml is in .gitignore, then when I run git clone (on the server) the database.yaml will not be created, but I need it.

I thought than I am doing wrong something. Can you see where is my mistake ?

thank you, Alessandro


Solution

  • In my projects, I usually make a copy of a usable database config in a database.example.yml, then when someone clones the projects, copy the database.example.yml to database.yml and make the needed changes.