Hacker News new | ask | show | jobs
by nolemurs 3588 days ago
Once you understand Git's data model, the UI is perfectly intuitive and very efficient. When you want to do something in git, it generally requires just a single command - you just have to know what you actually want to do.

Attempts at different UIs fail because they're all trying to put an abstraction over top of git that doesn't actually reflect the underlying data. As a result, they're limited to the set of git functionality that overlaps their abstraction, and the tools are less powerful.

1 comments

This is a good article:

https://stevebennett.me/2012/02/24/10-things-i-hate-about-gi...

> Once you understand Git's data model, the UI is perfectly intuitive

So it's not intuitive at all.

Not to mention that every damn command is inconsistent with every other command! To remove a file, git rm. To remove a branch, git branch -D. To remove a commit, git reset --hard HEAD^. How is this intuitive, consistent, or even sane?

"I understand git" and "git is easily understandable" are completely different. Git is not easily understandable, at all.

`git reset` doesn't simply remove commits. Depending upon what you reset to it could result in `git log` showing additional commits, or an entirely different set of commits. Conversely, there's no invocation of `git rm` which creates files. In this case, the commands look different because they do totally different things.

You'd have a better argument with `git rm`, `git branch -D` and `git remote remove`. :)

Yeah, that was the first thing that popped into my head, but examples certainly abound.
I mean, I'll agree, if you insist on trying to create an abstraction to understand git, you can beat your head against the wall for days trying to figure out how it works. On the other hand, if you just take a couple hours to really try to understand what it's doing and why it's not that hard, and it's way more effective and powerful than any other tool out there. Personally I like tools that are powerful and efficient once learned over tools that I can use without any learning.

Note that I never said git is easy to learn, just that once you take the time to understand it, it's actually quite natural and intuitive.

That article you linked is clearly from someone who liked how simple subversion was and is annoyed that git requires more than 15 minutes to learn. But there's a reason almost no one is using subversion anymore.

> Personally I like tools that are powerful and efficient once learned over tools that I can use without any learning.

I prefer powerful and efficient tools that I can use without any learning, since the two aren't mutually exclusive.

> if you just take a couple hours to really try to understand what it's doing and why it's not that hard,

What is it in git's architecture and design that mandates that a file should be removed with "rm", a branch with "branch -D" and a remote with "remote remove"? What about its fundamental architecture makes it so that the commands can't be "git rm", "git branch rm", "git remote rm"?

Nothing, and this is the crux of the argument. Git's porcelain is inconsistent, unintuitive and poorly designed.

> Note that I never said git is easy to learn, just that once you take the time to understand it, it's actually quite natural and intuitive.

What does "intuitive" mean if not "easy to learn"?

> That article you linked is clearly from someone who liked how simple subversion was

Maybe so, but that doesn't invalidate its arguments.

> prefer powerful and efficient tools that I can use without any learning, since the two aren't mutually exclusive.

They're not necessarily mutually exclusive, but in my experience there's often a trade off. I would argue that git is about as simple to as it can be without taking power away from the user by forcing an abstraction on him.

> What is it in git's architecture and design that mandates that a file should be removed with "rm", a branch with "branch -D" and a remote with "remote remove"?

Yeah... I have to agree that the choice of command line arguments is the weakest element of git.

> What does "intuitive" mean if not "easy to learn"?

The two often go together, but aren't necessarily the same thing. Something is "intuitive" if the correct thing to do is natural and obvious without a whole lot of thought. Git isn't intuitive before you understand the data model, but once you do, you don't have to spend a lot of time figuring out how to accomplish things, so it becomes intuitive. I would argue that by contrast, subversion is intuitive out of the box, but as soon as you want to do more sophisticated things it becomes rapidly counter-intuitive and very difficult to work with.

> there's often a trade off

I agree with you there. It doesn't mean that things are as bad as "weak tools or hard-to-learn tools", but there's a tradeoff.

> I have to agree that the choice of command line arguments is the weakest element of git.

I think there's a fundamental misunderstanding here. Git's conceptual model is hard to learn, but there's no way around that. If you want to be proficient in Git, you have to understand the conceptual model, and people find it hard and mostly give up, and say that git's core is badly designed (which it's not).

This muddies the waters for people who claim that git's porcelain is badly designed (which it is), because then other people mistake that for the former argument, and we end up talking at cross-purposes.

I think we can both agree that git's core/architecture is great, and the porcelain is quite bad.

> Git isn't intuitive before you understand the data model

I think this meshes with my previous paragraph, but I think git could be much more intuitive (and require much less mandatory learning of the internals for someone to be productive with it) if the porcelain were better designed.

> Personally I like tools that are powerful and efficient once learned over tools that I can use without any learning.

You say that as if the two are mutually-exclusive. They aren't.