Learning center

How to review code when the branch is offline

Start with what the recipient needs to reproduce. A patch can reconstruct a change against an agreed base. A Git bundle can preserve the actual commits. A source archive can give a reviewer one version to read or build. The right handoff depends on what the receiving machine already has and what your team can transfer.

Work from the receiving side#

Suppose a controller team develops on a disconnected network and its reviewers work on a separate internal network. Both sides have the approved release commit. The proposed change adjusts a sensor timeout in one commit and adds a test in the next. The maintainer needs to cite both original commits in the decision.

An incremental Git bundle is a fit. The sender can use the approved release as a prerequisite. The receiver can check that the prerequisite exists, import the branch under a review ref and read both original commits. If a second reviewer has only the exported release files, that reviewer cannot import the same incremental bundle. They need the actual prerequisite objects or permission to receive a self-contained bundle and its reachable history. Git bundle prerequisites

The reviewer needs to do thisHandoff to try
Inspect the final tracked files and run an existing testExport a source snapshot
Reconstruct one proposed tree from a base already presentCheck and apply a diff to the exact base
Read the author’s intent and test each step of a linear seriesTransfer ordered patches
Cite the original commit IDsTransfer Git objects in a bundle
Inspect how the second revision changed after a rebaseCompare the two patch series

Check the files the reviewer can open#

Leave the network off for the trial. Ask a second person to open the changed files, an unchanged caller and one dependency the build uses. Record any missing Git blobs, submodule commits and LFS objects by name. A sparse working tree can hide a caller that the object store already has. If a correction is coming, keep the reviewed and proposed trees open side by side.

Once the recipient can reconstruct what the decision requires, compare review tools on a branch that exercises the same workflow.

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.

Start free with GitHub

Related reading