Skip to content

Git LFS

Store large files in a repository with the stock git lfs client.

Updated View as Markdown

Repositories take Git LFS files with the standard git lfs client: track the files, commit and push as usual. LFS uses the same credential as Git (the credential helper or your API key), and the same clone URL.

git lfs install
git lfs track "*.mp4"
git add .gitattributes public/hero.mp4
git commit -m "Add the hero video"
git push origin main
  • One LFS file is at most 5 GiB. A project holds up to 50 GiB of LFS files (adjustable).
  • Uploading needs git.repositories.push on the repository, and downloading git.repositories.pull.
  • The repository’s lfsBytes is what its LFS files take.

In the console, an LFS file’s page shows its size, with Download. Through the API, GetContents returns the pointer and its lfs (oid, size), and GetBlob with lfs=resolve returns the file itself:

curl -H "Authorization: Bearer $EZGH_API_KEY" -o hero.mp4 \
  "https://git-api.ezghcloud.com/v1/organizations/$ORG_ID/projects/$PROJECT_ID/repositories/$REPO/blobs/$SHA?lfs=resolve"
Navigation

Type to search…

↑↓ navigate↵ selectEsc close