Should I keep the same repository when rewriting an app with a new framework?
Asked by
MellowCedar47
I have a website project that was built with Angular several years ago. Now that I have more experience, especially with React, I want to rewrite much of it using a different framework. The core functionality and purpose of the site would remain mostly the same, but the implementation would change significantly. Should I keep working in the existing repository or create a new one? What factors usually determine whether a rewrite belongs in the same repository or starts as a separate project?
Answers
Starting a new repository is mainly useful when the projectโs purpose or business requirements have changed substantially, or when youโre creating a genuinely separate product. If the core functionality is staying the same, a framework migration alone usually isnโt enough reason to split the history. If you do start over, archive the old project and clearly point people to its replacement.
Reply to this answer
Iโd keep the existing repository if itโs still fundamentally the same application. The commit history can be useful, and replacing a lot of implementation code doesnโt erase the fact that itโs the same project. You could work on a separate branch, such as a React rewrite, while keeping the current version stable, then merge it once the replacement is ready. If the project has version numbers, this would reasonably be treated as a major version, like 2.0.
Reply to this answer
Keeping the repository also lets you demonstrate that you can handle a real migration. In professional development, projects are often moved between frameworks, languages, databases, or architectures instead of being discarded and rebuilt from nothing. Planning the transition, preserving functionality, and moving users safely are valuable skills, even if the rewrite itself involves writing a lot of new code.
Reply to this answer
Add your answer
Answers are reviewed before publication.
MellowCedar47: That makes sense. I hadnโt considered the migration itself as something worth showing, but handling a framework change while preserving the applicationโs behavior is different from simply starting a brand-new project.