I want to use git for the deployment of a django project as I have done before, but this time it would also be necessary to have production files (like uploaded files, sql db etc) somewhere in the repository, so that you can locally work easily with the same data as on the server; my idea would be to have three branches:
- master (on which the "normal" development is done/commited)
- production (that has additionally the production files (file uploads etc...)
- deployment (production with settings etc used for running on server)
The problem for me is: How to merge the changes done in master into the production branch, without changing/destroying any production data?
Is there a way to do merging selectively (eg not touch the files in media/uploads), or do some kind of "branch-selective tracking " or any other possibility to handle this?
On the other hand I also need to be able to pull the complete data coming from production use easily from the server to do some debugging for example... (I'm leaving database scheme changes out of this considerations right now because they could be done manually or in a seperate way)