explaingit

git-lfs/git-lfs

14,258GoAudience · developerComplexity · 2/5LicenseSetup · easy

TLDR

Git LFS is a Git extension that stores large files like images and videos on a separate server instead of inside your repository, keeping clone times fast and history clean.

Mindmap

mindmap
  root((repo))
    What it does
      Replaces large files
      Stores files separately
      Keeps history clean
    Tech stack
      Go
      Git extension
    Use cases
      Design asset repos
      Video in Git
      Binary file migration
    Setup
      Install once per machine
      Track file patterns
      Normal Git workflow
    Audience
      Developers
      Design teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Store large design assets like PSD files or videos in a Git repo without bloating clone times.

USE CASE 2

Migrate existing large binary files out of a repository's history using the git lfs migrate command.

USE CASE 3

Set up a team project so everyone automatically downloads only the large file versions they need.

USE CASE 4

Track specific file types like *.mp4 or *.psd with a .gitattributes rule so LFS applies automatically.

Tech stack

Go

Getting it running

Difficulty · easy Time to first run · 5min
Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Git LFS (Large File Storage) is an extension to Git that helps manage large files like images, videos, audio files, and design assets without bloating the repository's history. Git tracks every version of every file, which works well for source code but becomes unwieldy for large binary files that change frequently. Git LFS solves this by replacing those files in the repository with small pointer files, while the actual file contents are stored separately on a dedicated LFS server. When you clone or check out a repository, Git LFS downloads only the large file versions you need rather than the full history of every binary. Setting it up requires installing the extension and running git lfs install once per machine, then telling Git LFS which files to track using patterns like .psd or .mp4. After that, your normal Git workflow continues unchanged: you add, commit, and push as usual, and Git LFS handles the large files automatically in the background. The .gitattributes file stores the tracking rules and should be committed alongside the rest of your code so everyone working on the project benefits from the same configuration. For repositories that already have large files in their history, a migration command called git lfs migrate can retroactively move existing large files into LFS storage. This rewrites the repository's commit history, which changes all the Git object IDs, so it should be coordinated carefully across everyone working on the project. Git LFS is available for Linux, macOS, Windows, and FreeBSD. On Windows it is bundled with Git for Windows. It can also be installed via Homebrew on macOS or from pre-built binary packages. The extension is already supported by GitHub, GitLab, Bitbucket, and many other Git hosting services. The project is written in Go and released under the MIT license.

Copy-paste prompts

Prompt 1
I have a Git repo with large video and image files making it slow to clone. Show me how to set up Git LFS to track *.mp4 and *.psd files, commit the .gitattributes, and push everything.
Prompt 2
My team's repository has large binary files already in its history. Walk me through using git lfs migrate to move them to LFS storage, and what to tell teammates about re-cloning.
Prompt 3
I'm using GitHub and want to configure Git LFS for my design project. Give me the exact commands from installation through the first push.
Prompt 4
Explain what a Git LFS pointer file contains and how the checkout process works when a teammate clones a repo that uses LFS.
Open on GitHub → Explain another repo

← git-lfs on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.