At my work every line of code must be reviewed and this review is formalized in a merge request.
Now we are a facing a situation were one developer developed a prototype for a new product which is now going in production. There are a few hundred commits and lots of line changed all in one branch. I'm wondering what would be the best way to both review the code, formalize it with merge request and keep relatively clean history.
I have thought of two ways:
- The simplest way would be to review all existing code, do a merge request and merge the prototype branch in master (or a development branch). This solution would take time until being fully finished and could be mentally taxing for reviewers but keeps the git history.
- Another way I thought, would be to review component by component. In a new branch we create a new history were we commit one component each and do multiple merge request. This solution allow us to see progression and formalize that each component is validated (and not just a big chunk of work) but we would write a new git history that could cause merge issue.