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.

  1. Clone the SourceCraft repository:

    Warning

    You can only use HTTPS when working with LFS.

    1. Install Git.

    2. In the top-right corner of the repository page, click Clone.

    3. Copy the link for cloning the repository from the HTTPS field.

    4. In the terminal, run this command:

      git clone <link_for_cloning_repository>
      
    5. Enter a username.

    6. Specify the personal token as the password.

    7. Go to your cloned repository:

      cd <repository_name>
      
  2. Install git-lfs:

  3. Configure your repository to support LFS:

    git lfs install
    
  4. Copy the files you want to store in LFS into the repository.

  5. 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"

  6. 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
    

See also