I have an older portfolio built with HTML, CSS, and vanilla JavaScript, and I want to rebuild it with React and Vite while keeping the original version around. Would you keep both in one repository, use branches, or make a new repository?
Should I rebuild my old portfolio in the same repo or start fresh?
Answers
If the main goal is learning, Iโd keep the project in one repository and put the React app at the root. Move the old static site into a clearly named folder so the build setup and package files stay straightforward. That also makes it easy to compare the two versions.
Reply to this answer
A separate repository is cleaner if you expect the two versions to be maintained or deployed independently. You avoid mixing dependencies and build configuration, and each project is easier to understand on its own. The tradeoff is that their histories wonโt sit together in one place.
Reply to this answer
Branches are a good fit if the old version is mainly something you want to preserve, not keep developing. Leave it on a legacy branch, then rebuild the current version on your main branch. Git keeps the earlier work without needing a second copy of the files in the project.
Reply to this answer
Iโd decide based on how you want to work with the old site later. If youโll actively update both, separate folders or repositories make that clearer. If you just want a reference copy, a branch is simpler. There isnโt a special React requirement here, so pick the setup that will be easiest for you to run and explain.
Reply to this answer
Add your answer
Answers are reviewed before publication.
2L+Marmalade:
That sounds manageable. Iโll make sure the static version still has a clear way to be served separately.