Configuring a SourceCraft repository to support Git Large File Storage (LFS)
SourceCraft repositories support Git Large File Storage (LFS) for storing large files. We recommend using LFS for storing objects larger than 100 MB in the repository.
-
Clone the SourceCraft repository:
Warning
You can only use HTTPS when working with LFS.
HTTPS-
In the top-right corner of the repository page, click
-
Copy the
-
In the terminal, run this command:
git clone <link_for_cloning_repository>
-
Enter a username.
-
Specify the personal token as the password.
-
Go to your cloned repository:
cd <repository_name>
-
Install
git-lfs
: -
Configure your repository to support LFS:
git lfs install
-
Copy the files you want to store in LFS into the repository.
-
List the files for LFS storage, separating them with spaces:
git lfs track "<path_to_large_file_1>" "<path_to_large_file_2>" "<path_to_large_file_n>"
Tip
You can also specify file templates to store in LFS, e.g.,
git lfs track "*.png"
-
Stage the files in Git, create a commit, and push the changes to the remote repository:
git add . git commit -m "added LFS objects" git push origin main