We have a git repo that is set up in a git-flow(ish) type way -- we have 3 "mainline" branches, dev, release, and production. Our workflow is something is that a new piece of code goes into dev, which has a cycle of two weeks. Once those two weeks is up, dev becomes "release", at which point it is tested and things are fixed on it, but no new features are applied. 2 weeks after that, release gets deployed, and becomes the production branch, which doesn't really get touched (except in the case of emergency out of band fixes)
Because of that, we have 3 versions of the database locally to track the 3 different branches. We tend to have a lot of schema churn, so it is very common that changes that happen to it in the dev branch could break what is on release or production.
The problem is, how do you manage 3 different sets of config files in the same git repository? Currently, what we are doing is .gitignoring them, and keeping 3 local versions of the codebase on everyones machine. However, this isn't really ideal for several reasons, and it would be great if we could have a single version of the repo and just switch between the branches.
I guess I am looking for a way to check a file in to a branch, and have it stay there, but not get picked up between merges of the mainline branches. So that way there could be a version on dev, one on release, and a third on master, but each would be isolated from the others. Sort of like a .gitignore for merging.
Is that even possible? Has anyone run into this before? (can't believe we are the only ones) How did you solve it?