Most active commenters
  • krick(5)
  • sunshowers(4)
  • lawn(3)

←back to thread

94 points vincent_s | 22 comments | | HN request time: 2.933s | source | bottom
1. hakube ◴[] No.40915275[source]
why does Git need to be replaced?
replies(2): >>40917348 #>>40920741 #
2. krick ◴[] No.40917348[source]
This. It's not like we are looking for something slightly better than git in some opinionated way. There's plenty better than git. Mercurial is better than git and as old as git. Git won. Everybody uses git. Everyone who knows, how to use git, is mostly comfortable using git. At this stage we either need something ground-breaking (and I don't quite imagine what this cold be in the context of VCS - even truly semantic conflict resolution barely cuts it, while simultaneously being pure unattainable magic), or I don't think this is gonna float. I don't need it. Who needs it?

It's a relatively easy thing to adopt something you don't need, when you are the only person involved. But VCS is pretty much in the same category as instant messaging and social network platforms are. In a sense, maybe it is a social network platform. I don't see it happening and I highly doubt I would want it to happed, even if I knew this jj stuff better.

replies(3): >>40918916 #>>40918919 #>>40919759 #
3. ezst ◴[] No.40918916[source]
Git won because GitHub turned the whole contribution model into a resume-making social media game. The first generation on GitHub pressured the second one into using it at a time when the DVCS scene was still nascent (and git's many flaws, more excusable), and the second one, now turned into a critical mass, made it acceptable for the next to just cargo cult a few commands instead of learning their VCS, because that was the bare minimum to _partake in the game_, and an acceptable trade-off to deal with a now objectively user-hostile and inferior tool.

The nice (and quite unique) thing about jj is that it takes all the good cues from systems which kept improving (and in particular, from mercurial), and slaps them onto git without requiring a storage model change, practically offering the social "perks" of GitHub (by being fully compatible with it), with no-compromise. And to be honest, at this point, there isn't much reason for a new comer to learn git rather than jj, and that's a wonderful news in my book.

replies(1): >>40920175 #
4. xigoi ◴[] No.40918919[source]
As far as I can tell, Jujutsu solves this problem by being compatible with Git.
replies(1): >>40920115 #
5. sunshowers ◴[] No.40919759[source]
Jujutsu has Git as a supported backend, so it does not need network effects to succeed. I was using it full time at Oxide for many months before anyone else was aware of it.

More generally: I am more knowledgeable about version control than 99% of people (having worked on it full time for many years). The Git UI is well beyond papercut bad. Many advanced users use the rebase-interactive workflow, which is broken in numerous ways.

See my testimonial (top one on the page) for an example where Jujutsu's rethink of VCS basics leads to an incredibly coherent interface. Jujutsu is built by world-class developers who have spent many years working on other systems and drawing lessons from them, and it shows! https://martinvonz.github.io/jj/latest/testimonials/

If I were introducing version control to someone new, I would not be proud of introducing Git and would constantly apologize for it. I'd be proud of introducing Jujutsu.

6. krick ◴[] No.40920115{3}[source]
I'm not sure I see what problem it even solves at all. Like, really, what you cannot achieve with git that you would with this thing?
replies(4): >>40920216 #>>40923672 #>>40924496 #>>40929823 #
7. krick ◴[] No.40920175{3}[source]
> isn't much reason for a new comer to learn git rather than jj

The reason would be that jj uses git as a backend, and all your coworkers use git, and the whole world uses git, so using jj while not knowing git is like being "html-programmer" that doesn't know what RAM is. Surely one can live like that, but I wouldn't want to work with him.

On other hand, what is the reason to learn jj rather than git? What actual problem it solves?

replies(2): >>40920317 #>>40925928 #
8. sunshowers ◴[] No.40920216{4}[source]
See my testimonial in the other reply to yours. Jujutsu is both more approachable to newcomers and does a fantastic job catering to some of the most advanced workflows. It is truly special (this is not something I'd say for almost any other software project).
replies(1): >>40922337 #
9. joshuamorton ◴[] No.40920317{4}[source]
Knowing what RAM is and being an expert in it are different things though.

"git is the underlying protocol that jj is compatible with, and sites like GitHub speak git's protocol", there now you know what git is.

10. lawn ◴[] No.40920741[source]
Because there are several issues with it?

Terrible cli user experience and having to resolve the same rebase conflict again and again for instance.

And maybe because other tools do things better?

replies(1): >>40925075 #
11. krick ◴[] No.40922337{5}[source]
I've read it, but it doesn't quite answer my question. What I'm hearing is basically "well, it's nicer". Sure, I can believe that even not delving into the subject, because pretty much everything is nicer than git. A bunch of aliases and 3rd party diff are nicer than default git too, I don't think this is what we are talking about. But what problem it solves?

You are saying that rebase-interactive workflow is broken. I do rebase-interactive a lot. Well, maybe it is broken, maybe I would get annoyed about it beyond belief if I spent as much time messing with its internals as you (supposedly) did. But I don't think I often have problems with it as a user. I guess conflict-handling could have been much smarter, but if I keep "temporary" commits very small and atomic it somehow manages to do the job better than I sometimes expect, and in the end I don't think I have any problems with it whatsoever. So, once again, what is the problem jj solves? Can you give some practical, not overly-contrived example when using jj over git is not "nice", but significantly useful, when it saves me somehow?

replies(2): >>40923405 #>>40934722 #
12. sunshowers ◴[] No.40923405{6}[source]
(A <- B means that A is a parent of B.)

Let's say you have a stack of three commits, A <- B <- C. Let's say you do a git rebase -i with edit commands on A and B. You make some changes to A, then you go and edit B.

But then you realize that some changes you wanted to make to B, you want to make to A instead -- you want to go back to A.

git rebase -i doesn't let you go back to A. (In other words, the modal nature of git rebase -i means that you can't do a rebase -i inside of a rebase -i.) Instead, you must complete the rebase -i and go to C, and start a new rebase -i.

Now that doesn't sound like a problem, but let's say C is not just 1 commit, it's 10 or even 20. And maybe there are branches with experimental work that you're grabbing bits and pieces of.

  A <- B <- C1 <- C2 <- C3 <- C4 ... C9 <- C10
                         ^     ^
                         |     |
                        E1    E2
And those commits have significant merge conflicts that you must resolve immediately before you can go back to A.

In contrast, Jujutsu isn't modal. You can freely move up and down a stack, and merge conflict resolution can be deferred until later.

(This isn't a contrived example. I literally just finished up a few weeks' work on a stack of 14 rather substantial commits. At its peak, 12 commits were outstanding, totaling around 15k lines of code. Jujutsu handled this extremely well.)

edit: apologies, monospace formatting isn't working well on HN. But I hope you get the gist.

replies(1): >>40930894 #
13. lawn ◴[] No.40923672{4}[source]
Why do we invent new programming languages? We can achieve everything with just C or assembly.

As an example of something that's much easier in Jujutsu and very difficult with Git is to work on all branches at the same time. With Jujutsu you can rebase all branches simultaneously too.

See this description of the workflow: https://steveklabnik.github.io/jujutsu-tutorial/advanced/sim...

14. xigoi ◴[] No.40924496{4}[source]
What problem does a dishwasher solve? What can you achieve with a dishwasher that you cannot achieve by washing dishes manually?
15. hakube ◴[] No.40925075[source]
I have been using Git for 8 years and haven't had any bad experiences with CLI. And this one and other tools that are supposed to replace Git are better in what way? The only thing that's better in this is the conflict resolution but other than that, it doesn't offer that much.
replies(1): >>40925710 #
16. lawn ◴[] No.40925710{3}[source]
I've used Git for over 16 years and have countless of papercuts with the CLI. Of course as you grow more experienced you eventually memorize the commands you end up using despite them not having much consistency (git checkout removes files, but it also changes or creates branches for instance).

This is a major pain for people learning Git for the first time and basically everyone have run into these issues, while a more user-friendly tool would've saved so much pain and suffering. There's a reason why most people cling to a Git GUI like their life depends on it.

Being easier to learn and reason about together with better conflict resolution and rebasing are substantial improvements I'd say.

17. ezst ◴[] No.40925928{4}[source]
"the whole world uses git" is a weak appeal to the masses (Argumentum ad populum), i.e. the popularity of git is no measure for its qualities, and we should collectively strive for better (just looking around should make it painfully obvious that there are many good things that git is lacking).

We previously saw that git is in fact two very distinct things: a repo format and a user interface; and we saw that git is too critical a mass to be dislodged as a repository format. The next best thing we can do is then to address its disastrous UX, and this is precisely what jj is about. And it tackles that without even incurring "contagious" changes in established organizations: neither you or I have to know/care whether others are using git-cli/vscode gui/jj/whatever.

This is progress, because teaching git to this day is in equal parts teaching "DVCS theory", git "the useful parts", git "the very many pointy bits not to get too close to", and git "I messed it up, please help me rescue my files". At least jj offers to simplify the learning while improving on the experience greatly, by offering a very cohesive, straightforward, discoverable safe and mostly trouble-free implementation whose tenets that can be intuited from the theory.

18. steveklabnik ◴[] No.40929823{4}[source]
For me, this framing is backwards: git cannot achieve what I can with jj. jj has everything I love about git, is more powerful, and is more orthogonal (read: simpler).

I loved git. I now love jj more.

19. krick ◴[] No.40930894{7}[source]
Thanks, this is something to consider at least. However, it doesn't convince me still. While I understand your problem, this problem doesn't really occur in my workflow, so a tool that encourages this workflow doesn't seem appealing and I cannot answer myself yet, why would I need to introduce this problem.

This is because I pretty much never use "edit". Well, not "never", but I avoid it, and it is perfectly avoidable in the vast majority of cases. Also, I don't like to deal with conflicts, as they are error prone, so I try to avoid them as well. Every time I want to change something in an old commit (on the same branch) I'll just add a new commit with barely comprehensible commit message, and I commit every little change. Also, if there is an atomic change in 2 files (function renamed), I usually commit them separately, including file name in the message. Then, after finishing some significant part of work, I'll rebase -i master, reorder commits and most of these "new" fixes will end up with "f" modifier after an olde commit, some I'll just drop. I'll do it in multiple iterations, to see which (reordering) operation results in a conflict, to keep conflict resolution operation as small and straight-forward as possible. So being modal is a good thing, as I'll run rebase a half-dozen times, before changes made up to the moment are all cleared up and I can move forward with committing new stuff. I never want to stay inside of one "rebase" operation for long, if I do, I'll probably --abort, and stop to reconsider what I'm doing here.

Even if "editing" past commit would be completely effortless, I just don't want to do that, because I don't want to think about how "later" changes might affect this place. When I do that, there is a whole new class of potential human mistakes one could make, that just doesn't exist when you always work on the "latest" version of the code. In worst case scenario, I might break some intermediate commit when carelessly reordering stuff, but the final code result must remain the same as before I did rebase. If this isn't the case, there is this uncomfortable scenario that I make some edit which is logically incompatible with a "later" conflict, which I won't notice if it doesn't cause a conflict: and it totally might not cause a conflict. I don't want to worry about that.

replies(2): >>40940289 #>>40940296 #
20. martinvonz ◴[] No.40934722{6}[source]
One simple example is undo. You can simply run `jj undo` if you made a mistake (it obviously won't unpush commits to a remote and such). You can go back as many steps as you like.
21. ◴[] No.40940289{8}[source]
22. sunshowers ◴[] No.40940296{8}[source]
It is certainly possible that this particular improvement isn't hugely relevant to you. However this is well beyond "it's nicer" -- it has been a game-changer for me, and the core ideas Jujutsu is built out of result in many such improvements across all kinds of workflows. And I want to emphasize again that this is not contrived; it is how I actually did some work recently.

But also, tools shape our behaviors. Your current workflows are influenced by how Git works, and it's quite possible with Jujutsu you'll change your workflows. Maybe in a direction that you'll like more in the end.