Learning center

Which Git bundle can an offline reviewer import?

Use an incremental bundle when the receiving repository already holds the exclusion commit and its required history. Use a self-contained bundle when the receiving repository is empty and the recipient may receive the branch’s reachable history. Verify the file on the receiver before scheduling the review.

Turn a shared release into a prerequisite#

In this example, the sender has local branches named approved-base and review. The latter adds two commits. The recipient already has a complete checkout of the approved release. The sender exports only the objects beyond the base.

git bundle create controller.bundle approved-base..review

From inside the receiver’s repository, check and import the file:

git bundle verify /approved-transfer/controller.bundle
git fetch /approved-transfer/controller.bundle refs/heads/review:refs/heads/incoming-review
git log --oneline approved-base..incoming-review

The log should show the two new commits if the receiver’s base identifies the same release. A fresh repository given the same file should fail verification for the missing prerequisite, even if someone copied the approved release’s files into its working directory. The file copy supplies neither the prerequisite commit nor its history. Git bundle reference and verification

Use git bundle create controller.bundle review when the boundary allows a complete bundle of that branch. It can include earlier versions of files, even files deleted from the current tree. When approval covers only today’s files, use a source archive and agree on how the reviewer will identify it.

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