Hacker News new | ask | show | jobs
by lmm 2046 days ago
> I fully agree that the default porcelain has poor UX for managing the staging area, but doesn’t a porcelain without it encourage overly large commits?

No, I'd say the opposite. The staging area encourages me to think that I can make my change and split it up into logical commits afterwards, even though I know I'll actually just give up and make it a big commit. When I didn't know about the staging area and just committed whenever I could, I produced better, smaller commits.

2 comments

> The staging area encourages me to think that I can make my change and split it up into logical commits afterwards, even though I know I'll actually just give up and make it a big commit.

That sounds like a personal discipline problem and not a poor tool.

The whole point of a tool like git is so that I don't have to expend personal discipline.
That's like claiming a gun is just used for shooting other things and that the point of the gun is so you don't have to understand how to handle it. Then when you shoot yourself in the foot you get mad at the gun and not yourself.
Guns are expected to be drop-safe. Some people say "well you shouldn't be so careless with a lethal weapon anyway", and yet most people will want their gun to avoid firing a bullet when dropped.
Compare a Sig P226 to a Type 94 Nambu.

Both are guns. Neither will shoot you if you understand how to handle it. One is much easier to make mistakes with than the other.

The parent is saying that Git is the Nambu of DVCS.

https://en.wikipedia.org/wiki/Type_94_Nambu_pistol#Unintenti...

That's how you get good commits... you do a bunch of changes to understand what you should have done and then you retell the story by carving it into commits. I have been doing this constantly for like a decade now and almost never "give up"... in contrast, Subversion, which doesn't have a staging area, is almost impossible to use as it requires you to somehow code in order the first time, which is ridiculous: no one is that perfect.