---
title: "How to keep two offline review versions open at once | Proofline"
description: "Create a detached worktree for each exact version you need to inspect."
url: https://proofline.sh/learn/git-worktree-offline-review/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# How to keep two offline review versions open at once

Create a detached worktree for each exact version you need to inspect. Git can share its object database across both directories while keeping their working files and indexes separate.

Code review The Proofline team November 23, 2026 1 min read

## 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](https://git-scm.com/docs/git-worktree)

If you also need to decide which commits to inspect again, [compare the two patch series](/learn/git-range-diff-offline-review/) before spending time rerunning the first review.

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [What to re-review after an offline branch is rebased](/learn/git-range-diff-offline-review/)
    
    Code review The Proofline team November 23, 2026 1 min read
    
-   ### [How to review code when the branch is offline](/learn/offline-code-review/)
    
    Code review The Proofline team November 23, 2026 2 min read
