SuperAPIAI Directory

gitferry

github.com · AI coding

GitFerry is an open-source tool for transferring Git changes in offline (air-gapped) environments. It can package unpushed commits, staged/unstaged changes, and untracked files into a portable .gitferry file, which is then verified and applied to the same repository on another machine, without sharing a remote repository or a network. The tool provides a command-line interface and a local stdio MCP server that can be integrated into clients such as Claude Code and Codex, and it also supports transfer between a screen and a camera via QR codes. It requires Node.js 22+ and Git 2.32+.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Purpose

GitFerry is aimed at scenarios where there is no network access or where sharing a remote repository is inconvenient: it packages Git changes on one machine into a single file, which can be carried to another machine via USB, secure file transfer, email, or even QR codes, and then verified and applied to the same repository. The officially listed scenarios include air-gapped environments, on-site customer work, handover of unfinished work, and offline review.

Main capabilities

  • Packaged content: unpushed commits, staged and unstaged changes, untracked files (respecting .gitignore).
  • State preservation: staged and unstaged states remain consistent on the other end.
  • Pre-apply verification: sha256 checksum for each file, same-repository fingerprint (root commit) check, base commit check, and clean working tree check.
  • Binary safety: tracked files use --binary patches, and untracked files are saved as raw bytes.
  • Pure Git fallback: when packing with --portable, a standard zip is generated, and only git + unzip are needed to apply it manually; the default compact format requires Node to unpack, and the unpack command is written in the README.txt inside the package.
  • Selection modes: all (commits + staged + unstaged + untracked), uncommitted, staged, unstaged, committed, repo (a snapshot of currently tracked files, which can initialize an empty directory).
  • QR code transfer: one machine loops through QR codes, and another receives them with a camera; each frame carries a chunk number and a transfer ID, and the file is written only after all chunks are received and the whole-file sha256 matches.
  • MCP server: runs locally over stdio and provides three tools: pack_changes, inspect_bundle, and apply_bundle.

Usage

Requires Node.js 22 or newer and Git 2.32 or newer. Install the CLI and MCP server from npm. The MCP registration command for Claude Code is:

claude mcp add --transport stdio gitferry -- npx --yes --package=gitferry@0.4.2 gitferry-mcp

After registration, restart the client and confirm that the three tools appear. In closed environments without npm, you can download gitferry.cjs, gitferry-mcp.cjs, and S from the v0.4.2 release pageHA256SUMS, see INSTALL.md for details.

Typical workflow: package changes into a .gitferry file on the source machine; on the receiving machine, first run inspect to check, then dry-run to view the plan, and finally apply. The apply order is: commits (git am -3, preserving author/date/commit message) → staged patches → unstaged patches → untracked files (existing files are not overwritten by default unless --force).

Use cases

Code handoff in air-gapped or isolated networks, returning changes after on-site development, offline code review, and collaboration without a shared remote repository.

Limitations

  • Merge commits within the packaging scope are flattened by format-patch, and the tool will issue a warning; it is recommended to use a linear branch or change --base.
  • Replayed commits get new SHAs (content and author unchanged, committer changes); this is normal git am behavior.
  • Change bundles require both ends to share repository history (verified via root commit fingerprint); snapshot bundles can initialize an empty directory.
  • The applying side requires Git ≥ 2.32.
  • QR code transfer throughput is roughly chunk × fps, about 0.3 KB/s in a default terminal, about 0.6 KB/s in a browser, and about 1.8 KB/s with --color; it is suitable for patch-sized bundles, not multi-MB large bundles.
  • The apply process is not transactional; on conflicts, follow the prompts (git am --continue / --abort, and use .rej files if necessary).
  • Bundles may contain source code, commit messages, and untracked sensitive files; checksums can only detect corruption, not verify sender identity, so only apply bundles from trusted sources.
  • The MCP server has the file system permissions of the process that starts it and should only be configured in trusted clients; force bypasses repository, dirty worktree, and overwrite protections.
  • MCP clients that support URLs only require an additional bridge and cannot connect directly to this local server.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools