I have a commercial plugin hosted on a private gitlab repository.
The repository has the following branches: - master branch: where I work on the plugin - production branch: same as master, but the js files are compressed because I had problems with plagiarism before and I want to secure my work as much as possible. - demo branch: same as production branch with small changes to prevent features from being disabled on purpose buy demo users on the live demo.
And so, the hierarchy is as follows: master -> production -> demo
The problem is the way I handle these branches: When I've done some work on the master branch, I need to checkout the production branch and pull in the changes from master, and then I have to re-compress the js files yet again, which is tedious, I want to ignore some js files from being updated.
Then I have to checkout the demo branch and pull in from production, and resolve any conflicts with the changes I have made for the demo version.
I am very new to branches, I mostly worked the on master branch, and my use case is a bit different from the examples I've seen.
This is definitely not the best approach/practice, and so I would like to know, based on your experience, is there a better way to handle these branches? Please let me know. Thank you.