r/webdev • • 1d ago

How big is a Git commit?

https://ratfactor.com/cards/git-commit-size
36 Upvotes

26 comments sorted by

76

u/ggnndd12 1d ago

2cm

14

u/obsidianih 1d ago

Perfectly average size imo

3

u/Consibl 1d ago

It was bigger before, I swear.

1

u/TrashPandu 20h ago

it just cold outside

1

u/endless_shrimp 14h ago

I WAS IN THE POOL

29

u/cornovum77 1d ago

I think most of these files are 4K because that is the smallest block allocation. ‘du’ shows block space.

2

u/EnderAvni 1d 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

4

u/International_Sky526 1d 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.

2

u/foonek 1d ago

On your disk

13

u/EyesOfTheConcord 1d ago

1.2530 rem

1

u/29FFF 12h ago

This is like saying “how big is a box of stuff”? Depends on the stuff and how you pack it.

1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/webdev-ModTeam 1d 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.

1

u/iLukey php 1d ago

A little bit smaller when it's cold.

-1

u/hikingsticks 1d ago

Mine is definitely above 6 inches, you just have to measure from the base.

-1

u/[deleted] 1d ago

[removed] — view removed comment

1

u/MatthewMob Web Engineer 1d ago

Mods please ban all these spammer bots. 

0

u/[deleted] 1d ago

[removed] — view removed comment

1

u/webdev-ModTeam 1d 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.

-2

u/AAPL_ 1d ago

bout half foot

-2

u/kegster2 1d ago

The size between your middle finger knuckle and the tip of your finger

-8

u/Mistr_John_Alex 1d ago

Most people assume a commit's size tracks the files changed, but the commit itself is just a small object holding the tree, parent, author, and message. The size you get from the object inspection command is that object, not the diff or the blobs that hold file contents. A tiny change and a huge change can produce nearly the same commit size; what grows is usually the number of parents or the message length. Are you trying to estimate repo size for a migration, or just figure out what an individual commit weighs?

4

u/armahillo rails 1d ago

nah, it’s more like 3-4 meters

5

u/AAPL_ 1d ago

lick my ass