1
0
mirror of synced 2025-12-23 11:54:18 -05:00
Files
docs/content/github/managing-large-files/moving-a-file-in-your-repository-to-git-large-file-storage.md
2020-11-02 15:12:44 -06:00

2.5 KiB

title, intro, redirect_from, versions
title intro redirect_from versions
Moving a file in your repository to Git Large File Storage If you've set up {% data variables.large_files.product_name_short %}, and you have an existing file in your repository that needs to be tracked in {% data variables.large_files.product_name_short %}, you need to first remove it from your repository.
/articles/moving-a-file-in-your-repository-to-git-large-file-storage
free-pro-team enterprise-server github-ae
* * *

After installing {% data variables.large_files.product_name_short %} and configuring {% data variables.large_files.product_name_short %} tracking, you can move files from Git's regular tracking to {% data variables.large_files.product_name_short %}. For more information, see "Installing {% data variables.large_files.product_name_long %}" and "Configuring {% data variables.large_files.product_name_long %}."

{% data reusables.large_files.resolving-upload-failures %}

{% tip %}

Tip: If you get an error that "this exceeds {% data variables.large_files.product_name_short %}'s file size limit of {% data variables.large_files.max_github_size %}" 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 {% data variables.large_files.product_name_long %}. For more information about the git lfs migrate command, see the Git LFS 2.2.0 release announcement.

{% endtip %}

  1. Remove the file from the repository's Git history using either the filter-branch command or BFG Repo-Cleaner. For detailed information on using these, see "Removing sensitive data from a repository."
  2. Configure tracking for your file and push it to {% data variables.large_files.product_name_short %}. For more information on this procedure, see "Configuring {% data variables.large_files.product_name_long %}."

Further reading