GIT-LFS-INSTALL(1)
π
GIT-LFS-INSTALL(1) β the git-lfs-install glow-up
okay so bestie, this is the manual page for git-lfs-install from the git-lfs(1) suite, and it's basically the "set your repo up so LFS actually works" button. let's get into it π
β¨ SYNOPSIS β¨
git lfs install [options]
πΈ DESCRIPTION πΈ
so here's the deal β running this does the following things to make sure Git LFS is set up properly. and by "properly" I mean Actually Working:
- sets up the
cleanandsmudgefilters under the name"lfs"in the global Git config. yes queen, the filters. they're the whole vibe. - installs a
pre-pushhook that runsgit-lfs-pre-push(1)for the current repository β but only if you run it from inside one, no cap. and heads up: if"core.hooksPath"is configured in any Git configuration (and supported, i.e. the installed Git version is at least2.9.0), then thepre-pushhook gets installed to that directory instead. she adapts π
π₯ OPTIONS π₯
so, without any options at all, git lfs install will only set up the "lfs" smudge and clean filters if they are not already set. like, she won't touch what's already there. respectful icon behaviour.
-f,--forceβ sets the"lfs"smudge and clean filters and overwrites existing values. she's not asking, she's telling π-l,--localβ sets the"lfs"smudge and clean filters in the local repository's git config, instead of the global git config (~/.gitconfig). keeping it close to home, we love that.-w,--worktreeβ sets the"lfs"smudge and clean filters in the current working tree's git config, instead of the global git config (~/.gitconfig) or the local repository's git config ($GIT_DIR/config). if multiple working trees are in use, the Git config extensionworktreeConfigmust be enabled to use this option. if only one working tree is in use,--worktreehas the same effect as--local. also it's only available if the installed Git version is at least2.20.0and therefore supports the"worktreeConfig"extension. very specific, very demure β¨-m,--manualβ prints instructions for manually updating your hooks to include git-lfs functionality. use this option ifgit lfs installfails because of existing hooks and you want to retain their functionality β i.e. don't nuke your old hooks, just read the instructions and do it by hand. we respect legacy π«Ά--systemβ sets the"lfs"smudge and clean filters in the system git config, e.g./etc/gitconfig, instead of the global git config (~/.gitconfig). going full system-wide, main character energy π--file=<file>β sets thelfssmudge and clean filters in the Git configuration file specified by the <file> argument. put it wherever you want, bestie.-s,--skip-smudgeβ skips automatic downloading of objects on clone or pull. β οΈ this means you need a manualgit lfs pullevery time a new commit is checked out on your repository. every. single. time. know what you're signing up for π--skip-repoβ skips installation of hooks into the local repository. use this if you want to install the LFS filters but not make changes to the hooks. and good news: it is valid to use--local,--global, or--systemin conjunction with this option. mix and match, she contains multitudes π
ngl the-s/--skip-smudgeone is the trap option β it's giving "I'll remember to pull manually" and then you absolutely will not. dramatic but true, the page literally says it requires a manualgit lfs pullevery time a new commit is checked out. π
π¦ SEE ALSO π¦
part of the git-lfs(1) suite π§
and that's the whole page, bestie β no crumbs left, every flag accounted for. this little number lives under GIT-LFS-INSTALL(1) in the git-lfs docs, and yeah, the header and footer are both just GIT-LFS-INSTALL(1) being extra π mwah, go set up your filters β¨
π¦ where this page comes from
- arch rolling: git-lfs 3.8.1-1 Β· MIT
- nixos 26.05: git-lfs 3.8.1
- nixpkgs unstable: git-lfs 3.8.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms