TortoiseGit and Git LFS: Keeping Large Binaries Out of Your Repository History
TortoiseGit 4.0+ includes built-in Git LFS commands that route large binaries through a separate cache. Learn how the GUI handles tracking, commits, and the trade-offs you need to watch.
27 Mar 2026, 00:17 UTC

You know the drill. You drop a 300 MB compiled asset or a raw video file into a project folder, right-click, and choose Git Commit through TortoiseGit. The dialog sits there. The .git directory swells by hundreds of megabytes. Pushing to the remote takes long enough that you go make coffee, and if the connection drops, you start over. The useful takeaway is that TortoiseGit 4.0 and newer includes built-in Git LFS support that moves the heavy binary into a separate cache and leaves only a tiny pointer in the repository—all without leaving Windows Explorer.
The GUI makes Large File Storage approachable, but you still need to understand what happens under the hood. Pointer files, remote quotas, and local cache growth are real constraints. This article walks through what TortoiseGit actually does with LFS, a concrete example you can follow, and the trade-offs that bite teams who treat LFS as a magic bullet.
What Git LFS Does Before You Touch the GUI
Git Large File Storage (LFS) replaces a large file in your repository with a small text file called a pointer. The pointer is usually around 130 bytes and contains a SHA-256 hash, the file size, and a version marker. The actual binary lives in a local cache on your machine and is uploaded to a remote LFS store when you push.
When a teammate clones or pulls, Git downloads the pointer first. The heavy binary is fetched only when the working tree actually needs it. This keeps clones fast and prevents the main .git history from growing every time a designer updates a Photoshop file.
How TortoiseGit Surfaces LFS in Explorer
TortoiseGit 4.0+ exposes LFS operations directly in the context menu rather than forcing you to memorize command-line flags.
- Install LFS: If the Git LFS client is missing, right-click a working folder and choose TortoiseGit → Install Git LFS. A confirmation dialog and progress bar indicate the client is configured.
- Track and Untrack: Right-click files or folders to add or remove LFS patterns. TortoiseGit updates the
.gitattributesfile for you, so you do not have to hand-edit filter rules. - Status icons: A file under LFS management gets a distinct overlay icon in Explorer, giving you a visual cue before you commit.
- Commit feedback: When you commit an LFS-tracked file, the commit dialog shows a separate Uploading LFS objects progress bar. The commit itself records the pointer, not the full binary.
Worked Example: Routing a Large Asset Through LFS
Suppose your repository stores marketing videos and you want to track *.mp4 files. The steps below assume TortoiseGit 4.0 or newer and a remote that supports LFS, such as GitHub, GitLab, or Azure DevOps.
Verify LFS Support
Open TortoiseGit → Settings and look for a Git LFS page in the left-hand tree. If the page exists, your installed version supports LFS. If it does not, upgrade TortoiseGit before continuing.
Install the Client and Track a Pattern
In Windows Explorer, navigate to your repository folder. Right-click the folder (not an empty space) and choose TortoiseGit → Install Git LFS. Wait for the confirmation dialog. This modifies your workstation by installing the git-lfs filter; if your organization manages software centrally, confirm with your administrator first.
Next, right-click the folder that will contain the large files and choose the Track option for the pattern you need. For *.mp4, TortoiseGit writes the appropriate rule into .gitattributes. Open that file in a text editor to confirm. You should see a line similar to:
*.mp4 filter=lfs diff=lfs merge=lfs -text
If the line is missing, the pattern was not applied and the file will be committed as a normal binary.
Commit and Check the Result
Add the .gitattributes file and your large .mp4 file to the index using TortoiseGit → Add. Open the commit dialog. During the commit, watch for the separate Uploading LFS objects progress bar. Its presence confirms the file was routed through LFS rather than stored inline.
After the commit completes, verify the repository stayed lightweight. Open a terminal inside the repository—Git Bash or the TortoiseGit terminal both work—and run:
git lfs ls-files
Required permissions are standard user access to the repository. The expected output lists the path of your tracked file. If the file does not appear, the .gitattributes rule was not active when the file was staged.
Push as you normally would. If the remote does not have LFS enabled or you have exhausted your storage quota, the push will fail. Check the remote's web interface for LFS usage before retrying.
Trade-offs You Need to Watch
LFS is powerful, but it introduces friction that the GUI does not fully hide.
| Concern | What Happens | Practical Impact |
|---|---|---|
| Diff and merge blindness | TortoiseGit's diff and merge tools treat LFS pointers as normal text. | A pointer conflict looks like a small text diff, but the underlying binaries differ. You must fetch the actual objects to resolve it. |
| Local cache growth | Downloaded LFS objects are cached on disk. | The cache can grow large over time. LFS is not a substitute for repository hygiene; version large files only when necessary. |
| Remote dependency | The server must support LFS and provide quota. | Pushes fail if LFS is disabled or storage is full. Monitor usage via the remote's web UI or command-line tools. |
| Startup overhead | The LFS filter processes files during TortoiseGit operations. | Expect a small delay on status checks and commits in repositories with many tracked patterns. |
A Practical Checklist
- Confirm the Git LFS page exists in TortoiseGit Settings.
- Install the client via the Explorer context menu if it is missing.
- Track only the patterns you truly need; avoid blanket rules like
*. - Commit and look for the separate Uploading LFS objects progress bar.
- Run
git lfs ls-filesin the repository terminal to confirm the file is tracked. - Check remote LFS quota before pushing large batches.
- Periodically review your local LFS cache size and prune old objects if disk space runs low.
LFS will not make a bloated repository healthy on its own, but TortoiseGit's built-in commands remove the command-line barrier. Use the GUI to route the right files through LFS, keep an eye on the cache and the remote quota, and your Windows workflow stays fast without forcing everyone to memorize filter syntax.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.