A GitHub CLI extension for migrating Git LFS objects between GitHub organizations and GitHub Enterprise Server instances.
The extension discovers repositories using LFS, downloads their source objects, and uploads only objects missing from the destination.
- GitHub CLI
- Git and Git LFS for
migrateandpull - Existing destination repositories and refs
- Source and destination tokens with repository access
export and sync do not require Git LFS.
gh extension install mona-actions/gh-migrate-lfsUpgrade an existing installation:
gh extension upgrade gh-migrate-lfsgh migrate-lfs migrate \
--source-organization source-org \
--source-token "$SOURCE_TOKEN" \
--target-organization target-org \
--target-token "$TARGET_TOKEN" \
--work-dir ./lfs-migrationThe command:
- Exports repositories containing LFS configuration.
- Creates or updates bare source mirrors and runs
git lfs fetch --all. - Uploads missing objects directly through the destination LFS Batch API.
- Reconciles destination state and writes a run report.
See Usage for staged commands, dry runs, output modes, and performance controls.
Unlike git lfs push --all, which walks Git refs and history to discover referenced objects, sync scans the local LFS object store and negotiates those OIDs directly with the destination. This avoids ref traversal and transfers only missing LFS content; it does not push commits, branches, or tags.
The destination is authoritative. There are no local completion checkpoints: rerunning safely renegotiates all OIDs and skips objects already present remotely.
- Usage: end-to-end and staged workflows, output, dry runs, and performance tuning.
- Operations reference: reports, recovery, manifests, configuration, proxies, and safety.
- Development: local checks and privileged live-transfer CI setup.