Move Repositories Offline With git bundle

Pack an entire repository, including history, into a single file.

macOSbackupgitcliLow risk
Run git bundle create repo.bundle --all to package every ref into one file.

01Command

Command
$ git bundle create repo.bundle --all

02What it does

A bundle is a single file that another machine can clone or fetch from, which is ideal for air-gapped networks and archival backups. It carries full history and can be verified with git bundle verify.

03Risk

RiskLow risk
RequirementsGit 2.20+ (install with Homebrew or Xcode Command Line Tools)
CompatibilitymacOS with Git installed (Homebrew or Xcode Command Line Tools)
!Warning: A bundle captures refs but not untracked files, hooks or configuration; pair it with other backups for a full copy.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • git-bundle documentation
    Git · vendor-doc · 2026-09-20
    Evidence: Documents git bundle, which packages refs and objects into one file.

Last verified: 2026-10-13 · Category: Developer

06Related solutions