Git LFS is used to store large files outside your repository, but continue using them as if they were part of it. It's a great way to maintain a small repository size for faster syncing and builds, while keeping the external services you rely on the same.
Setting up Git LFS#
Setting up Git LFS is covered on the Git Large File Storage site. Each of our providers also have their own instructions for setting up Git LFS:
A great way to use Git LFS is to track your uploads path, so new asset files in the editor are stored there. Running git lfs track "uploads/**"
tracks all files inside of the /uploads
folder.
Enabling Git LFS in CloudCannon#
If enabled, adding files in the editor that match your configured Git LFS paths will sync through Git LFS, just as they would locally.
To enable Git LFS for your site:
- Set up Git LFS for your repository and provider
- Navigate to Site Settings / Source Syncing
- Connect to your provider and repository if you haven't already
- Enable the Use Git LFS checkbox
- Save changes
By default, CloudCannon will not attempt to use Git LFS.