Use Git LFS controls
Git LFS stores large files, such as images, videos or models, outside the repository and keeps small pointer files in their place. Git LFS… sets it up, tracks patterns, downloads content, locks files and prunes old content.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
Before you start
- The git-lfs program is installed: Homebrew or git-lfs.com on macOS, included with Git for Windows,
sudo apt install git-lfson Linux (Ubuntu and Debian).
Where to find it
- The command palette: Git LFS… and Git LFS: Download Content.
| Action | macOS | Windows and Linux |
|---|---|---|
| The command palette, then Git LFS… | ⌘⇧P | Ctrl+Shift+P |
Steps
Set it up
Open Git LFS…. If it says Git LFS is not set up for this repository., choose Set Up for This Repository.
Track a pattern
Under Tracked patterns, type a Pattern such as
*.psdand press Track. Turn on Lockable for files people should not edit at the same time. Commit.gitattributes.Download content
Choose Download Content to fetch the real files for pointers in your checkout. Show Files lists which are downloaded or pointer only.
Expected result
Large files go to LFS storage on push, and your clone holds only what you download.
Locks and pruning
- Show Locks lists locked files and who holds them; Lock a file before editing it, Unlock when done.
- Prune Old Content… removes local copies of old LFS content to free disk space; it shows what it would remove first.
If something goes wrong
“Git LFS is not installed.”
Install git-lfs as the message describes for your system, then reopen the dialog.
Questions
Does tracking a pattern move files already committed?
No. Tracking applies to files you add or change from then on; moving existing history into LFS needs a history rewrite outside GitTree.