Skip to main content
← All guides

Move existing LFS history from GitHub

Copy all required LFS objects before switching collaborators, and keep the old copy until verification is complete.

Prepare the migration

  1. Confirm every required object across history fits within your 10 GB workspace allowance. Files must be no larger than 5 GB each.
  2. Pause writes or arrange a final synchronization window. Record the existing LFS endpoint and all local lfs.url, lfs.pushurl, and remote-specific overrides.
  3. Keep an independent backup. Confirm that the source credentials can read every required branch and tag, including any separately managed refs.

Fetch from the old host first

In a complete clone with the original LFS configuration still active, fetch Git refs and all reachable LFS objects. Do not switch the endpoint until this succeeds. Extra refs outside the remote's normal fetch refspec must be fetched explicitly.

git fetch origin --prune --tags
git lfs fetch --all origin

Copy to LFSPush

Create the destination repository and a scoped write token. Resolve any existing push URL overrides so uploads use the intended destination. A local URL override lets you test the copy before changing the shared configuration.

git config --local credential.https://lfspush.dev.useHttpPath true
git config --local lfs.url https://lfspush.dev/lfs/rep_YOUR_ID
git lfs push --all origin

Switch the team after verification

Verify the destination in a clean clone using an explicit local LFSPush URL override, then test current and historical files. After the final source synchronization and destination upload, commit the shared endpoint. Reapply local overrides as needed when checking older commits whose .lfsconfig still points at the old host.

git config -f .lfsconfig lfs.url https://lfspush.dev/lfs/rep_YOUR_ID
git add .lfsconfig
git commit -m 'Move LFS storage to LFSPush'
git push origin HEAD

Client references

Open your workspace