|
|
|
|
|
by fulafel
3203 days ago
|
|
Ok, if your set of changes is too large to review in one piece, and you put in the work of refactoring your changes into a speedrun-style best possible history so they are cognitively review-friendly, I grant that this is a valid use case for rebase.
Though erasing the real history is still a serious drawback, and the unit of code review is still too large. Not many projects work like this, however. |
|
What we do is to have a developement branch, with the real history. When ready for merge/review, we duplicate that branch, rebase -i (on the same origin) to clean it all up without making any changes -- changes aren't allowed, only history split then merge the clean branch in the dev one (no conflicts: no changes!) and THEN ask for reviews on that clean branch.
If there are further changes, park the 'clean' branch, continue working on dev branch as before, and make any changes needed (typically we use the 'autosquash' naming convention), and re-do the cleanup before re-submitting.
Once the review is complete, just merge again dev<->clean, and merge that in the trunk.
That way you have the whole history complete, and you also have a set of 'public' patches that have been reviewed and potentially can be upstreamed.