Git Large File Storage (Git LFS) enables you to store large files outside of your Git repository, but continue to access them as if they were within the repository. Enabling Git LFS is a great way to maintain a smaller repository size for faster syncing and building.
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.
Setting up Git LFS is a two part process:
- Install Git LFS
- Enable Git LFS in your CloudCannon Site Settings
To install Git LFS, follow the installation guide on the Git Large File Storage website. Alternatively, you can use the instructions provided by Bitbucket, GitHub, or GitLab.
To enable Git LFS for your Site:
- Navigate to the Source Syncing page under Site Settings.
- Check the Enable Git LFS checkbox under Additional Settings.
- Click the Update Settings button.
You have enabled Git LFS on CloudCannon.
CloudCannon will prompt you to check the Enable Git LFS option in your Site Settings if it detects you have a .gitattributes
file in your repository. This warning will appear in the Needs Attention section on your Status page.