Skip to main content

Work with large files in Git repositories.

# To initialise Git LFS:
git lfs install

# To track files that match a glob:
git lfs track '<*.bin>'

# To change the Git LFS endpoint URL (useful if the LFS server is separate from the Git server):
git config -f .lfsconfig lfs.url <lfs_endpoint_url>

# To list tracked patterns:
git lfs track

# To list tracked files that have been commited:
git lfs ls-files

# To push all Git LFS objects to the remote server (useful if errors are encountered):
git lfs push --all <remote_name> <branch_name>

# To fetch all Git LFS objects:
git lfs fetch

# To checkout all Git LFS objects:
git lfs checkout