| English | 中文 |
Git LFS is used to manage large files.
Git itself is well-suited for managing text and small files. If large binary files frequently enter regular Git history, they will make the repository increasingly slow and raise the costs of clone, fetch, and diff operations.
These contents should ideally be placed in object storage, artifact repositories, or CI caches.
Enable after installation:
git lfs install
Track a specific type of file:
git lfs track "*.psd"
git add .gitattributes
git add design.psd
git commit -m "chore(lfs): track design assets"
.gitattributes into the repositoryHistory needs to be cleaned up, typically using git filter-repo or BFG Repo-Cleaner.
Cleaning up history affects collaborators; the team must be notified in advance.