Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

Git LFS

$ git-lfs Foundation Low Risk
Git LFS Contributors · Code & DevOps · MIT · macos / linux / windows

Replaces large binary assets inside Git repositories with lightweight text pointers while storing file contents on a remote LFS server. Agents use git lfs ls-files, git lfs status, and git lfs prune --dry-run to inspect and manage large-object storage safely.

FCRS-1.0 Score
83 /100
Good
High Confidence
Zero-Friction Install
brew install git-lfs
CLI vs MCP Decision CLI Only

Binary pointer resolution and local .git/lfs cache pruning are pure local Git operations with no MCP equivalent.

Agent-Readiness Checklist

Local Probe Evidence
— JSON Output
— Field Filtering
✓ Non-Interactive
✓ Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md
Version
git-lfs/3.7.0 (GitHub; darwin arm64; go 1.24.4)
Startup
155 ms
Exit Codes (help / invalid)
0 / 127
NO_COLOR Clean / Non-TTY Safe
Yes / Safe
Captured --help excerpt
git lfs <command> [<args>]

Git LFS is a system for managing and versioning large files in
association with a Git repository. Instead of storing the large files
within the Git repository as blobs, Git LFS stores special "pointer
files" in the repository, while storing the actual file contents on a
Git LFS server. The contents of the large file are downloaded
automatically when needed, for example when a Git branch containing the
large file is checked out.

Git LFS works by using a "smudge" filter to look up the large file
contents based on the pointer file, and a "clean" filter to create a new
version of the pointer file when the large file's contents change. It
also uses a pre-push hook to upload the large file contents to the Git
LFS server whenever a commit containing a new large file version is
about to be pushed to the corresponding Git server.

Commands
--------

Like Git, Git LFS commands are separated into high level ("porcelain")
commands and low level ("plumbing") commands.

High level porcelain commands
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

git lfs checkout:
  Populate working copy with real content from Git LFS files.
git lfs completion:
  Generate shell scripts for command-line tab-completion of Git LFS commands.
git lfs dedup:
  De-duplicate Git LFS files.
git lfs env:
  Display the Git LFS environment.
git lfs ext:
  Display Git LFS extension details.
git lfs fetch:
  Download Git LFS files from a remote.
git lfs fsck:
  Check Git LFS files for consistency.
git lfs install:
  Install Git LFS configuration.
git lfs lock:
  Set a file as "locked" on the Git LFS server.
git lfs locks:
  List currently "locked" files from the Git LFS server.
git lfs logs:
  Show errors from the Git LFS command.
git lfs ls-files:
  Show information about Git LFS files in the index
  and working tree.
git lfs migrate:
  Migrate history to or from Git LFS
git lfs prune:
  Delete old Git LFS files from local storage
git lfs pull:
  Fetch Git LFS changes from the remote & checkout any required working tree
  files.
git lfs push:
  Push queued large files to the Git LFS endpoint.
git lfs status:
  Show the status of Git LFS files in the working
  tree.
git lfs track:
  View or add Git LFS paths to Git attributes.
git lfs uninstall:
  Uninstall Git LFS by removing hooks and smudge/clean filter configuration.
git lfs unlock:
  Remove "locked" setting for a file on the Git LFS server.
git lfs untrack:
  Remove Git LFS paths from Git Attributes.
git lfs update:
  Update Git hook

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 18 / 25

Deterministic non-interactive commands (ls-files, status --porcelain, locks --json), though most subcommands emit plain text rather than JSON.

  • git lfs ls-files --long and git lfs status --porcelain provide clean output
  • Lacks universal --json across most commands
Trust & Safety 21 / 25

Safe pointer model with --dry-run support on prune and migrate, and inherits Git credential isolation.

  • git lfs prune --dry-run and git lfs migrate info prevent blind mutations
Setup & Portability 14 / 15

Single static Go binary available via Homebrew and official packages across macOS, Linux, and Windows.

  • Cross-platform binary installed via brew install git-lfs
Utility & Efficiency 13 / 15

Solves large-file bloat in Git repos cleanly via transparent Git filter hooks.

  • Handles pointer hydration and upload transparently on git commands
Maintenance & Lineage 9 / 10

Long-standing MIT project originally created by GitHub and maintained by Git LFS contributors.

  • Active git-lfs/git-lfs repository under MIT license
Docs & Verifiability 8 / 10

Well-documented manpages and subcommand --help pages.

  • Complete command manpages in git-lfs/docs

Security, Auth & Guardrails

Auth Modes
No Auth OS Keychain Config File
Credential Storage

Inherits Git credential helpers and SSH authentication from the host repository; server overrides live in .lfsconfig.

Side Effects
Read-Only Local Write Remote Write
Cost & Quotas

MIT open-source CLI; remote LFS bandwidth and storage quotas depend on your Git host.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# Git LFS (git-lfs) Agent Rules
- Run `git lfs track` before committing large binaries so files are not stored directly in Git history.
- Always preview cache cleanup with `git lfs prune --dry-run` before running `git lfs prune`.

Agent-Ready Command Recipes

Safe Read-Only Queries

List tracked LFS files and OIDs
git lfs ls-files --long

Lists tracked LFS paths alongside their full SHA-256 object IDs without modifying the repo.

Inspect LFS tracking patterns
git lfs track

Prints currently configured .gitattributes LFS tracking rules.

Controlled Writes & Previews

Dry-run local LFS cache cleanup
git lfs prune --dry-run

Reports old local LFS objects eligible for pruning without deleting anything.

Strengths for Agents

  • + git lfs prune --dry-run and git lfs migrate info let agents inspect impact safely.
  • + Single Go binary integrates directly as a git lfs subcommand.
  • + Reuses standard Git authentication with zero extra token setup.

Caveats & Pitfalls

  • ! Only select commands like git lfs locks --json emit JSON; most output plain text.
  • ! Forgetting git lfs install leaves pointer files unhydrated in fresh containers.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI