Import from Git LFS
Moving your files from a Git LFS-enabled repository into XetHub allows you to leverage Xet-specific features like mount, variable block-level deduplication, and custom visualization for maximum efficiency and functionality. Read more about how XetHub deduplication works to understand how we manage your data.
Create a new Xet repository
Skip this section if you already have a Xet repository that you'd like to migrate files into.
Begin by initializing a new empty Xet repository from the XetHub UI and cloning it to your local machine.
Navigate to your newly cloned Xet repository and make sure that you're on the
git checkout main
Import a snapshot of an existing Git LFS repository
This import path copies a snapshot of your current Git LFS repository into XetHub without affecting the original repository. While XetHub will track the evolution of your repository going forward, you will need to use Git LFS in the original repository to access history or other branches.
Ensure that you have an up-to-date local copy of your existing Git LFS repository.
a. If you don't have a local copy, clone the repository into a directory called
LFSRepo. (Assumes Git LFS is already installed.)
git clone <Existing Git LFS repository's Git URL> LFSRepo
b. If already have the repository locally, navigate to it and pull to make sure you have the latest changes.
cd <LFS Repository>
Copy over all the files from the existing repository into the new Xet repository.
rsync -av --exclude='.git/' --exclude='.gitattributes' <LFS Repository> <new-xet-repo>
Navigate to your new Xet repository to add and commit the Git LFS snapshot.
git add ./ && git commit
This will create a commit containing everything from your existing Git LFS repository. A snapshot of existing Git LFS repository has now been successfully been imported to XetHub! The git-xet extension will automatically pick up all new files, deduplicate all the data, and manage changes going forward.