- Install Git LFS
brew install git-lfsThis uses Homebrew.
- Turn on Git LFS for your user
git lfs installYou only do this once per computer.
- Tell Git LFS which files to handle
git lfs track "*.psd"Run this inside your project. It writes the pattern to a file called .gitattributes. Use quotes so your shell does not expand the pattern.
- Commit the tracking rule
git add .gitattributes && git commit -m "Track *.psd with Git LFS" - Add and push big files as usual
git add . && git commit -m "Add big files" && git pushGit stores a small pointer in the repo and uploads the real file to the LFS storage on your host. Files committed before you ran track stay in normal Git history.
Check it worked
- See which patterns Git LFS tracks
git lfs track - List the files stored with Git LFS
git lfs ls-files
Undo it
- Stop tracking a pattern
git lfs untrack "*.psd"New files that match go back into normal Git. Commit .gitattributes afterwards. Files already pushed stay in LFS storage.
- Download the real files after cloning
git lfs pullUse this if you see small text pointer files instead of your big files.
- Install Git LFS
sudo apt install git-lfsThis is for Ubuntu and Debian. Other systems have git-lfs in their own package manager.
- Turn on Git LFS for your user
git lfs installYou only do this once per computer.
- Tell Git LFS which files to handle
git lfs track "*.psd"Run this inside your project. It writes the pattern to a file called .gitattributes. Use quotes so your shell does not expand the pattern.
- Commit the tracking rule
git add .gitattributes && git commit -m "Track *.psd with Git LFS" - Add and push big files as usual
git add . && git commit -m "Add big files" && git pushGit stores a small pointer in the repo and uploads the real file to the LFS storage on your host. Files committed before you ran track stay in normal Git history.
Check it worked
- See which patterns Git LFS tracks
git lfs track - List the files stored with Git LFS
git lfs ls-files
Undo it
- Stop tracking a pattern
git lfs untrack "*.psd"New files that match go back into normal Git. Commit .gitattributes afterwards. Files already pushed stay in LFS storage.
- Download the real files after cloning
git lfs pullUse this if you see small text pointer files instead of your big files.
- Install Git LFS
winget install GitHub.GitLFSGit for Windows already includes Git LFS if you ticked it in the installer, so you can skip this step. Check with git lfs version.
- Turn on Git LFS for your user
git lfs installYou only do this once per computer.
- Tell Git LFS which files to handle
git lfs track "*.psd"Run this inside your project. It writes the pattern to a file called .gitattributes. Use quotes so your shell does not expand the pattern.
- Commit the tracking rule
git add .gitattributes && git commit -m "Track *.psd with Git LFS" - Add and push big files as usual
git add . && git commit -m "Add big files" && git pushGit stores a small pointer in the repo and uploads the real file to the LFS storage on your host. Files committed before you ran track stay in normal Git history.
Check it worked
- See which patterns Git LFS tracks
git lfs track - List the files stored with Git LFS
git lfs ls-files
Undo it
- Stop tracking a pattern
git lfs untrack "*.psd"New files that match go back into normal Git. Commit .gitattributes afterwards. Files already pushed stay in LFS storage.
- Download the real files after cloning
git lfs pullUse this if you see small text pointer files instead of your big files.