title: Can I have different private config files in different git branches?
body: <p>We're developing a product and we use Git as our SCM. Each minor version of the product lives in its separate branch. As a developer, I have my own set of databases, one for each minor version. I also have a private configuration file, which is ignored by Git, and it specifies which database to use. But because it is ignored by Git, it stays the same no matter what branch I'm currently on. That's no good, because if the config file says to use database db_1_2 (which is intended for branch 1.2), switching to branch 1.3 leaves the config file still pointing to database db_1_2.</p>
  
  <p>I currently have a piece of code read and parse the branch identifier in an effort to set the correct database, but it is error prone, because the Git identifier comes in many flavors, most of which are rather hard/impossible to resolve the correct branch name from.</p>
  
  <p>I can ask the product itself, but not all of the older versions have a static getVersion() method.</p>
  
  <p>So my question is this: Is there any good and clean way to have a private config file somehow belong to a branch, but not make it to the final product when pushed to the remote/central repo?</p>