I have a project I manage out of a git repository. We use the progit branching strategy (as described in the accepted answer, here: Git branch strategy for small dev team) where one branch is the production branch and another branch is the development/testing branch. We deploy the code using fabric.
When we're ready to make a new production release with git, we merge the development/testing branch into the production branch and then deploy the production branch using fabric. The problem is that there are code differences between development and production -- some logos change, some different DB hosts/credentials, that sort of thing. I've been keeping a .patch file containing the differences and having fabric apply the patch when it deploys the production environment, but this doesn't work that well. In particular, it totally fails if some of the code around the patch has changed -- the patch fails to apply and my deploy aborts.
I've been wondering if I shouldn't just apply all my changes to the production branch directly? What are the drawbacks of this?
One particular use case I'm concerned about is if we need to make a hotfix. We currently do this by branching from the production environment, making changes, and then merging that branch back into both development and production. If the production branch is different from the development one, can those changes get pulled into the development branch when the hotfix is merged into development?