So I've been using git for the first time, and there is a scenario that I don't quite know how to solve.
I've got a simple webapp (only html, css and js), and I want to produce regular releases that can be tracked with a version number. This is easy to do with git tag
. But the catch is that for my releases I want to do some extra things, like minifying the js scripts and updating the html pages to point to them. Also, I need a .gitattribute in the release that ignores the non-minified js scripts, so that git archive
produces the smallest possible output.
What I've done is creating a releases
branch. This branch includes the aforementioned .gitattributes
, and the modified html pages. Each time I want I new release, I switch to this branch, merge the changes from master, then finish the release and tag it with a version number. It seems to work as I want, but I'm not sure how this is supposed to be done.
My question for the more experienced git users is how is this case handled usually?