Bitzu

AZ-400 ยท Repository management

Large files with Git LFS

Git LFS tracking and pointer files, .gitattributes, LFS vs git-fat, storage and bandwidth limits, when to avoid committing binaries.

Key points

  • Git stores every binary version in full, so big, changing binaries slow clone, fetch and branching.
  • Git LFS: tiny text pointer (version, oid, size) in the repo, content in separate remote storage.
  • Patterns live in .gitattributes, added with git lfs track.
  • Without the LFS client, a checkout gets only pointer files.
  • Web UI uploads commit the binary itself.
  • Dependencies go to Azure Artifacts; never commit build output.

Source: https://learn.microsoft.com/en-us/azure/devops/repos/git/manage-large-files?view=azure-devops

Practice questions

Single choice

What does Git commit into the repository in place of a file tracked by Git LFS?

  1. A compressed copy of the file inside the pack file
  2. A small text pointer holding version, oid and size
  3. A symbolic link to a network share
  4. Only the file name, with the content dropped
Show answer

Answer: B. A small text pointer holding version, oid and size

A small pointer file (version, oid, size) is committed; the real content lives in LFS storage. A compressed copy or a hash-only commit would still bloat or lose the file.

Select all that apply

Which statements about Git LFS with Azure Repos are true?

  1. The binary content is kept in separate remote storage while the repo holds pointers
  2. Every Git client must install the LFS client to get real file content
  3. SSH is supported for repositories that contain LFS-tracked files
  4. Git can automatically merge two edited versions of a tracked binary
  5. Azure DevOps Services offers Git LFS at no extra charge
Show answer

Answer: A. The binary content is kept in separate remote storage while the repo holds pointers, B. Every Git client must install the LFS client to get real file content, E. Azure DevOps Services offers Git LFS at no extra charge

Content is stored remotely with pointers in the repo, every client needs the LFS client, and Azure DevOps Services offers LFS for free. SSH is not supported for repos with LFS-tracked files, and Git still cannot merge two binary versions.

True or false

Dragging a large binary into the Azure Repos web interface automatically stores it through Git LFS if its pattern is tracked.

Show answer

Answer: False

False. Uploading through the web interface commits the binary itself to the repo, not an LFS pointer, so use the Git client with LFS installed.

Practice 8 questions on this topic in Bitzu

Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.

Download on the App StoreGet it on Google Play

More AZ-400 topics in this module