Should I keep the same repository when rewriting an app with a different framework?

August 31, 2026 3 answers
Asked by MellowPine42
I have a website I built in Angular a few years ago, and I'm considering a substantial rewrite now that I'm more familiar with React. The core functionality and purpose would stay mostly the same, but much of the implementation would change. Is it better to keep the existing repository and preserve its history, or start a new one? What usually determines whether a project has changed enough to deserve a separate repository?

Answers

QuietMaple19
A framework migration is a legitimate engineering task and can be useful experience to demonstrate. Real projects are often migrated from one framework, language, database, or architecture to another while keeping the same underlying product. A new repository makes more sense when the business purpose and requirements are changing so much that youโ€™re effectively creating a different service. In this case, the core functionality is staying the same, so the existing repository fits.

MellowPine42: I hadnโ€™t thought of a framework migration as a skill by itself. Is it considered valuable because it involves adapting an existing system rather than simply starting from a blank template?

Reply to this answer
CedarFox7
Keep the existing repository if itโ€™s still fundamentally the same application. You can create a branch for the React rewrite, keep the current version stable while you work, and merge it once the new version is ready. Preserving the history is usually more valuable than having a perfectly clean repository.

MellowPine42: That makes sense. I like being able to look back at the old commits and see how much Iโ€™ve improved, so losing that history probably isnโ€™t worth it. I may treat the rewrite as a major version, such as version 2.0.

Reply to this answer
RiverAsh88
Changing the framework alone usually isnโ€™t enough reason to create a new repository. Keep the same project history and use a clearly named branch while developing the rewrite. Start a separate repository if the old project will remain untouched, the new project has a different purpose, or the requirements and architecture are changing so extensively that it is no longer really the same product.
Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions