svelandiag
svelandiag

Reputation: 4320

Rails: .gitignore still tracking my database.yml file

I have like 4 guys in my team and they constantly have to change the socket of the database because they have different paths for it, well it is becoming annoying, I tried to add database.yml to the .gitignore:

/config/database.yml

But for some weird reason when I edit the file and make a git statusit still is being tracked!! can someone tell me what could be?

Upvotes: 7

Views: 6284

Answers (1)

sugaryourcoffee
sugaryourcoffee

Reputation: 879

Try this:

$ echo config/database.yml >> .gitignore
$ mv config/database.yml config/database.yml.example
$ git add .
$ git commit -am "put database.yml to .gitignore and and rename"
$ cp config/database.yml.example config/database.yml

Upvotes: 16

Related Questions