Skip to content

Add a FAQ entry re memory usage by Git when cloning - #6137

Merged
chrisd8088 merged 2 commits into
git-lfs:mainfrom
chrisd8088:note-git-memory-use
Nov 11, 2025
Merged

chrisd8088 merged 2 commits into
git-lfs:mainfrom
chrisd8088:note-git-memory-use

Conversation

@chrisd8088

Copy link
Copy Markdown
Member

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-process command, 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 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.

/cc @bk2204
/cc @ivonindza as reporter of #6132

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.
@chrisd8088
chrisd8088 merged commit 901621e into git-lfs:main Nov 11, 2025
10 checks passed
@chrisd8088
chrisd8088 deleted the note-git-memory-use branch November 11, 2025 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo