Keep the first review readable during a correction#
Suppose an engineer reviewing a validation patch has local notes and a running test in one checkout. A corrected branch arrives before that review ends. Switching branches in the same directory changes the files the test and editor see. A second worktree lets the engineer inspect the corrected branch without moving the first review’s checkout.
With both versions already in the approved repository, add the detached worktrees:
git worktree add --detach ../inspection-v1 <first-reviewed-commit>
git worktree add --detach ../inspection-v2 <corrected-commit>
git -C ../inspection-v1 rev-parse HEAD
git -C ../inspection-v2 rev-parse HEAD
Record the two printed IDs with the test outputs. Use separate build directories or ports if the test runner otherwise shares state. A worktree changes the working directory Git manages. It does not separate test databases, system caches or network access. Git worktree details
If you also need to decide which commits to inspect again, compare the two patch series before spending time rerunning the first review.