SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Tuesday, June 29, 2010

Ignoring database.yml in Git

In rails app project, its not a good practice to include the database.yml in versions.Since some developers will go for mysql, postgres or oracle.Its not suggested to keep the database.yml under versioning, since it is having the secret passwords of our database.So inordre to exclude from the version, then i got the solution from this article.

Finally i went with some simple commands and my database.yml is not tracked or excluded from git.
echo database.yml > config/.gitignore
git add config/.gitignore
git commit

No comments :

Post a Comment