The hard drives of our local machines fill up with large files that are stored in Git LFS but that are not currently checked out.
It would be convenient if everything that is not part of the current commit was only stored at the server and downloaded as needed if a commit "exposes" them.
Is this possible using some configuration or are there any other Git extensions that could help?
Edit: A similar question suggests using
git lfs prune
You can prune all LFS files that are not part of the currently checked out commit by setting
git config lfs.pruneoffsetdays 0
once, and then running
git lfs prune
every time you want to shrink your repository. To routinely prune LFS objects, you can add the command to the pre-auto-gc
hook.