News for hackers. Stuff that matters.
Re:Ask HN: What are the best and worst command-line interfac... by sergiotapia on Wednesday November 24, 2021 @08:54AM (#29329941)
worst is git by far.

i'm used to it now but when I was learning, "what the fuck did `git reset --hard` do? where is --soft? Is there a no-flag version? What the fuck did I leave mercurial for. God damn I miss svn."

I still kind of miss Mercurial and TortoiseHG.

Re:Ask HN: What are the best and worst command-line interfac... by MontyCarloHall on Wednesday November 24, 2021 @09:08AM (#29330076)
The worst thing about git is how commands are inconsistently overloaded.

`git reset` both unstages files (opposite of `git add`, straightforward enough) but also can move the current HEAD pointer to an arbitrary commit. You’d think it could then also discard unstaged changes, but nope, that’s `git checkout -- …`, which incidentally has nothing to do with `git checkout`’s other functionality of switching branches.

There are so many other examples of this. `git rebase` can not only rebase but also combine and reorder commits via `rebase -i`, which seems totally unrelated to rebasing. `git branch` and `git checkout` have overlapping but also distinct functionality. I could go on for hours.

Re:Ask HN: What are the best and worst command-line interfac... by lcall on Thursday November 25, 2021 @12:58PM (#29343426)
For me, the fact that there are so many who really like git makes it worth recommending a cheat-sheet (or put up with it) for the rest, just to be compatible and have fewer tools to deal/learn with overall, but yes there are reasons some like svn, hg, or fossil. But there are also "got" (currently on openbsd at least) and other convenience tools.

I also found myself making myself a "gh" script to make finding/opening the right git manpage easier/quicker.

I always thought the UI of "git commit --interactive" was at a sweet spot of being both helpful and efficient, once I got familiar with it the first time. It is easier to remember than command-line options. Related UI details in another comment in this page.

Re:Ask HN: What are the best and worst command-line interfac... by linspace on Wednesday November 24, 2021 @04:09PM (#29335185)
Some day I will burn a day of my life to learn it inside out and be done with it. Meanwhile I use magit.

Mercurial was much better IMO but people argued about performance, because, you know, the CPU is the bottleneck when I merge code. How much time has been wasted navigating Stack Overflow?

Re:Ask HN: What are the best and worst command-line interfac... by zombietfk on Wednesday November 24, 2021 @09:09AM (#29330083)
100% agree with this. The nomenclature of the commands always felt too similar for different things to me, i.e. reset vs revert, checkout vs fetch vs pull. Feel like there could be much more descriptive and distinct names.
Re:Ask HN: What are the best and worst command-line interfac... by kwertyoowiyop on Thursday November 25, 2021 @08:20AM (#29341115)
If someone comments “git is fine once you get to know it” I might reach through the internet and slap them.
Re:Ask HN: What are the best and worst command-line interfac... by amznbyebyebye on Wednesday November 24, 2021 @09:01AM (#29330006)
Agree it is one of the most unintuitive cli I have ever used. If it’s really just manipulating a DAG, I wonder if a rewrite is possible with this in mind.
Re:Ask HN: What are the best and worst command-line interfac... by horstbort on Wednesday November 24, 2021 @05:14PM (#29335792)