this post was submitted on 08 Nov 2023
85 points (85.7% liked)

Programming

17483 readers
191 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities [email protected]



founded 1 year ago
MODERATORS
85
Why Git is hard (roadrunnertwice.dreamwidth.org)
submitted 1 year ago by learnbyexample to c/programming
you are viewing a single comment's thread
view the rest of the comments
[–] aport 9 points 1 year ago (1 children)

Each commit includes the diff and metadata (like parent commits).

Commits don't store diffs, so you're wrong from the start here.

Hence why people say "git is hard"

[–] [email protected] 4 points 1 year ago (1 children)

Yeah, you're right, technically it's not a "diff", it's the changed files.

I don't think this technical detail has any consequences for the general mental model of Git though - as evidenced by the fact that I have been using Git for years without knowing this detail, and without any problems.

[–] [email protected] 2 points 1 year ago

It's all the files. Content-addreasable storage means that they might not take up any more space. Smart checkout means they might not require disk operations. But it's the whole tree.