Article version: Enterprise Server 2.17
Moving a file in your repository to Git Large File Storage
If you've set up Git LFS, and you have an existing file in your repository that needs to be tracked in Git LFS, you need to first remove it from your repository.
After installing Git LFS and configuring Git LFS tracking, you can move files from Git's regular tracking to Git LFS. For more information, see "Installing Git Large File Storage" and "Configuring Git Large File Storage."
If there are referenced Git LFS files that did not upload successfully, you will receive an error message. For more information, see "Resolving Git Large File Storage upload failures."
Tip: If you get an error that "this exceeds Git LFS's file size limit of 100 MB" when you try to push files to Git, you can use
git lfs migrate instead of
filter branch or the BFG Repo Cleaner, to move the large file to Git Large File Storage. For more information about the
git lfs migrate command, see the Git LFS 2.2.0 release announcement.
- Remove the file from the repository's Git history using either the
filter-branchcommand or BFG Repo-Cleaner. For detailed information on using these, see "Removing sensitive data from a repository."
- Configure tracking for your file and push it to Git LFS. For more information on this procedure, see "Configuring Git Large File Storage."