Files in gitignore

I have a repository with a rails application on a Production server.

There is a .gitignore file in the repo:

...
    config/database.yaml 
...

Each developing client has a cloned repo with different config / database.yaml.

My problem is this:

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

I thought I was doing something wrong. Do you see where my mistake is?

Thank you alessandro

+2
source share
5 answers

database.example.yml, , - , database.example.yml .yml .

+10

( )

.

:

  • a database.yaml.template
  • 2 ( )
  • 1 script database.yaml

, script .

alt text

database.yaml "private" ( / ) .

+3

, database.example.yml, robertokl

- capistrano capistrano (script) database.yml config

+1

database.yaml - : ; , .

0

aleds is usually a bad idea to have your .yml database in the repository, so you see it in .gitignore. robertokl is right about providing the template file.

0
source

Source: https://habr.com/ru/post/1752238/


All Articles