I have built a webproject with a flat file cms, which basically stores all content in .yaml markdown files instead if a database and I‘m therefore able to control all the content with git. That's great for production, it allows me to have a editing history for every entry and pull the content from my origin to my local machine. That's why I also don‘t want to gitignore the /content folder.
I further have a stage environment where I develop all new features and let them tested by my customer. When the feature is ready I merge it with a release branch into master/production (trying to implement the git flow).
The problem: The stage is full of dummy content from me and also my customer and I don‘t want to delete this content. Neither do I want to copy/paste the production content into the release branch every time I deploy a new version.
I‘m asking myself, what is a good way to keep the dummy content out of production? As far as I know, I can‘t have multiple .gitignore files in different branches, which which I would be able to exclude some directories in specific branches. And I also don‘t know a way to exclude folders during a merge.
Does anybody have a good idea or can point me into the right direction?