Add a FAQ entry re memory usage by Git when cloning - #6137
Merged
Merged
Conversation
As discussed in response to the question raised in issue git-lfs#6132, at present Git's implementation of the long-running filter protocol is such that for each file whose contents are "smudged" by a process like the "git lfs filter-process" command, Git reads the output into an in-memory buffer: https://github.com/git/git/blob/v2.51.2/convert.c#L912-L913 As a result, Git's memory usage scales with the size of the largest Git LFS file when a "git clone" command is run, unless the Git LFS client is configured not to "smudge" files. To help users who may have questions about this behaviour in the future, we add a section to our FAQ manual page which explains the current situation and how it may be ameliorated by avoiding the "smudge" filter step during cloning and using the "git lfs pull" command instead to populate a working tree with Git LFS files.
larsxschneider
approved these changes
Nov 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As discussed in response to the question raised in issue #6132, at present Git's implementation of the long-running filter protocol is such that for each file whose contents are smudged by a process like the
git lfs filter-processcommand, Git reads the output into an in-memory buffer.As a result, Git's memory usage scales with the size of the largest Git LFS file when a
git clonecommand is run, unless the Git LFS client is configured not to smudge files.To help users who may have questions about this behaviour in the future, we add a section to our FAQ manual page which explains the current situation and how it may be ameliorated by avoiding the smudge filter step during cloning and using the
git lfs pullcommand instead to populate a working tree with Git LFS files./cc @bk2204
/cc @ivonindza as reporter of #6132