Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 531
svelandiag Avatar asked Nov 02 '15 04:11

svelandiag


1 Answers

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
like image 135
sugaryourcoffee Avatar answered Sep 20 '22 13:09

sugaryourcoffee