SVN development and production branches, with differing content in each

62 Views Asked by At

My situation at the moment is as follows: I have built a site locally, using grunt for various tasks (sass -> css, svg -> data uris, etc). I would now like to commit this all in to version control. Probably subversion but I would be open to a git solution.

Ideally I would like to commit the site with all the source files (for example the .scss files) but no generated files (eg style.css) into one branch, ie a development branch, and a production ready version of the site (without the .scss files) into another branch, which could then be deployed onto the live server.

Is this the correct way to go about achieving a development and production version of the site in version control? Or is there a completely different way of doing it?

1

There are 1 best solutions below

0
On BEST ANSWER

Is this the correct way

I don't think so - you branches are not "diverged some way" history of changes, but "the same code with and without artifacts"

is there a completely different way of doing it?

From my personal POV, it's a task of used deploy tool - skip (from DEVEL state with all objects) not needed in PROD artifacts (sass-files, svgs etc) and transfer only clean tree.

But mileage may vary