Skip to content

About

A GitHub CLI extension for migrating Git LFS objects between GitHub Enterprise Cloud and Enterprise Managed User organizations.

Topics

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Latest commit

 

History

25 Commits

Folders and files

Repository files navigation

gh-migrate-lfs

build GitHub Release

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.

Requirements

  • GitHub CLI
  • Git and Git LFS for migrate and pull
  • Existing destination repositories and refs
  • Source and destination tokens with repository access

export and sync do not require Git LFS.

Install

gh extension install mona-actions/gh-migrate-lfs

Upgrade an existing installation:

gh extension upgrade gh-migrate-lfs

Quick Start

gh migrate-lfs migrate \
  --source-organization source-org \
  --source-token "$SOURCE_TOKEN" \
  --target-organization target-org \
  --target-token "$TARGET_TOKEN" \
  --work-dir ./lfs-migration

The command:

  1. Exports repositories containing LFS configuration.
  2. Creates or updates bare source mirrors and runs git lfs fetch --all.
  3. Uploads missing objects directly through the destination LFS Batch API.
  4. Reconciles destination state and writes a run report.

See Usage for staged commands, dry runs, output modes, and performance controls.

Why Direct Sync

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.

Documentation

  • 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.

License

MIT © Mona Actions

About

A GitHub CLI extension for migrating Git LFS objects between GitHub Enterprise Cloud and Enterprise Managed User organizations.

Topics

Resources

Code of conduct

Contributing

Stars

6 stars

Watchers

1 watching

Forks

Releases

Contributors

Languages