Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The CLI is so confusing that Stackoverflow has a bunch of questions for things that should be easy or trivial by default. Last thing I would call git is "elegant".

https://stackoverflow.com/questions/tagged/git?tab=Votes



I knew there would be people commenting on this. But I don't think something has to be intuitive for newcomers to be elegant.

There are also posts here mentioning vim, which to most people is weird and useless at first.

Some tools takes effort to understand, but once you put in the effort, they become tremendously powerful.

I would say that they are elegant in that they allow you to do something otherwise difficult in an effortless and obvious way. Both vim and git does exactly that - once you've gotten to know how they work.


It's not intuitive to newcomers nor to experienced users. Its interface does not make sense; it can only be memorized. The data structure is beautiful; the tool is ugly.


> I would say that they are elegant in that they allow you to do something otherwise difficult in an effortless and obvious way.

But this CANNOT be said about git! For example [1]:

-----

In Git you can merge with an unrelated repository by doing:

> git fetch <project-to-union-merge>

> GIT_INDEX_FILE=.git/tmp-index git-read-tree FETCH_HEAD

> GIT_INDEX_FILE=.git/tmp-index git-checkout-cache -a -u

> git-update-cache --add -- (GIT_INDEX_FILE=.git/tmp-index git-ls-files)

> cp .git/FETCH_HEAD .git/MERGE_HEAD

> git commit

Those commands look quite arcane to my eye. In Mercurial we do:

> hg pull --force <project-to-union-merge>

> hg merge

> hg commit

-----

So in a sense you are right, that's exactly the point of contention. However, simple (and hard) things in Git are done in a complicated and non-obvious way, which require you to memorize a bunch of commands and flags which require understanding the internal implementation of git. There are much easier and intuitive ways of doing version control, and Mercurial proves it.

As a side note, I can't be bothered to look it up right now but iirc even Torvalds said that originally Git's CLI was not actually meant to be used by end users (rather, another abstraction layer on top would provide a friendlier approach to version control). But people ended up using it as it was, for various reasons.

[1] https://stackoverflow.com/a/892688/1780726




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: