3.3.2. How LFS Tracks Large Files#
Pointer Files: LFS replaces large files in a repository with small pointer files containing metadata, storing the actual files separately.
Storing Large Files The large files are stored on a remote LFS server.
Fetching Large Files: Cloning or pulling a repository with LFS, downloads the pointer files from the repository, and the large files are fetched from the LFS server as needed.
Adding Files:
Adding a large file with git lfs track
, creates a .gitattributes
file and adds an entry for the file type or specific file, telling LFS to manage these files.
Committing Changes: The pointer file is included in the commit, and the large file content is managed separately by LFS.
Deduplication: LFS stores each unique version of a large file only once on the LFS server.