osx - Git and Rails: ignore database.yml -


I finally took a good step by leaving SVN for Git and loving it. It should be somewhere, but I am not really able to do this like this, it is brain friendly.

My repo site is on my remote machine. I push the copy of my work and pull this data onto the production machine. A mayor difference though is 'one' file: database.imil, which will never change on the production machine.

Is it possible (and if so, how), when the data is pulled from the repo, only to "ignore" this file? I am doing this manually on this point, but some beauty will be appreciated.

Thank you.

My advice: do not even put it in the ball. Create a database.yml.skel or something like that, so that a user can create his / her own database.yml model, brain in it as a sample. However, in my opinion files are not included in the version control - for exactly the same reason you mention it.

Ignoring is very easy: In fact, there are several ways to do this. This is right for .gitignore file; The second one is .git / info / excludes . See for details.

So, on top of my head:

  echo database.yml & gt; & Gt; Config / .gitignore git add config / .gitignore git commit  

Comments