I created this repo as a sample: https://github.com/neves/deploy-workflow
I do my work on "master" and use the "deploy" branch for deploying to server. On master branch, I don't want to track the assets/vendor/*, so I ignore them.
On deploy branch I add them, because they need exist for deploy. All working till here.
The problem is that when I checkout back to master, the ignored content inside assets/vendor/ folder are deleted.
How can I stop that? Is there a better way to keep a separated branch for deploying with some different files in?