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 clean and smudge filters under the name "lfs" in the global Git config. yes queen, the filters. they're the whole vibe.
  • installs a pre-push hook that runs git-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 least 2.9.0), then the pre-push hook 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 extension worktreeConfig must be enabled to use this option. if only one working tree is in use, --worktree has the same effect as --local. also it's only available if the installed Git version is at least 2.20.0 and 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 if git lfs install fails 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 the lfs smudge 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 manual git lfs pull every 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 --system in conjunction with this option. mix and match, she contains multitudes 🌈
ngl the -s/--skip-smudge one 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 manual git lfs pull every 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