Article version: Enterprise Server 2.15

This version of GitHub Enterprise will be discontinued on This version of GitHub Enterprise was discontinued on 2019-10-16. No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise. For help with the upgrade, contact GitHub Enterprise support.

Migrating to a different Git Large File Storage server

You can migrate to a new Git Large File Storage (Git LFS) server by using the Git LFS client to fetch assets from the existing server and push them to the new location.

Before migrating to a different Git Large File Storage server, you must configure Git LFS to use a third party server. For more information, see "Configuring Git Large File Storage to use a third party server."

  1. Configure the repository with a second remote.

    $ git remote add NEW-REMOTE https://NEW-REMOTE-HOSTNAME/path/to/repo
     
    $ git lfs env
    > git-lfs/1.1.0 (GitHub; darwin amd64; go 1.5.1; git 94d356c)
    > git version 2.7.4 (Apple Git-66)
     
    > Endpoint=https://GITHUB-ENTERPRISE-HOST/path/to/repo/info/lfs (auth=basic)
    > Endpoint (NEW-REMOTE)=https://NEW-REMOTE-HOSTNAME/path/to/repo/info/lfs (auth=none)
  2. Fetch all objects from the old remote.

    $ git lfs fetch origin --all
    > Scanning for all objects ever referenced...
    > ✔ 16 objects found
    > Fetching objects...
    > Git LFS: (16 of 16 files) 48.71 MB / 48.85 MB
  3. Push all objects to the new remote.

    $ git lfs push NEW-REMOTE --all
    > Scanning for all objects ever referenced...
    > ✔ 16 objects found
    > Pushing objects...
    > Git LFS: (16 of 16 files) 48.00 MB / 48.85 MB, 879.10 KB skipped

Ask a human

Can't find what you're looking for?

Contact us