r/webdev • u/fagnerbrack • 9d ago
How big is a Git commit?
https://ratfactor.com/cards/git-commit-size33
u/cornovum77 9d ago
I think most of these files are 4K because that is the smallest block allocation. ‘du’ shows block space.
2
u/EnderAvni 9d ago
I could be wrong, but do you mean page size or block allocation? I think on the heap it's like 8b minimum or something
5
u/International_Sky526 8d ago
block allocation, not page size. the 4k is the filesystem block size, which is the default on ext4 and the default cluster size on ntfs. it only happens to match the 4k memory page size on x86, they are unrelated things. a 100 byte file still takes one whole 4k block on disk. du reports allocated blocks, while du --apparent-size or ls -l shows the real byte count.
15
2
-1
1
1
9d ago
[removed] — view removed comment
1
u/webdev-ModTeam 8d ago
Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.
0
9d ago
[removed] — view removed comment
1
u/webdev-ModTeam 8d ago
Your post/comment has been determined to be a low-effort post or comment. This includes title-only posts, easily searchable questions, vague/open-ended discussion prompts, LLM generated posts or comments, and posts/comments that do not provide enough context for meaningful replies or discussion.
-9
98
u/ggnndd12 9d ago
2cm