new branch or repository for different tech stack implementation of same site
Hey everyone, I been working on my site with plain HTML, CSS, and JS so far and I've implemented a decent amount of it. I also want to re-create what I have done with a different technology stack (Svelte/SvelteKit/Tailwind)
4 Replies
I don't know what would be best practice in regards to managing both of these different implementations. Is it bad practice to have the diff. implementations as branches in one repository or should I make a new repository for the new implementation?
I like the idea of different branches for each implementation, If that's not bad practice. Only way I can think of implementing that is to create a new branch from latest commit. Delete majority of files, setup Tailwind/Svelte/SvelteKit and make an initial commit for that implementation.
If you have different dependencies you may get conflicts when switching branches. You may end up
npm i
/yarn
everytime you switch branches. If a maximum of one branch uses node_modules, this is of no concern.
It also depends on your prefered method of transfering changes, copy from different files or git cherrypick.
I personally would make it two separete gits, but thats just my opinion.I'd also go for separate repos, tbh. The process of working on and deploying a sveltekit site is very different. Switching branches would delete most files from one set and add most files from the other. Not to mention that even if only one branch uses node_modules, that isn't usually managed by git, and so it'll just sit there while you're working on the html version
what you could do is a monorepo and put both projects, in separate subfolders, in the same one.
awesome, I've decided to go with two different repos. Thank you @daswolle and @jochemm for the help.