Most active commenters
  • BeetleB(3)
  • 1718627440(3)

←back to thread

Jujutsu for everyone

(jj-for-everyone.github.io)
434 points Bogdanp | 11 comments | | HN request time: 0.001s | source | bottom
Show context
marcuskaz ◴[] No.45084298[source]
> Jujutsu is more powerful than Git. Despite the fact that it's easier to learn and more intuitive, it actually has loads of awesome capabilities for power users that completely leave Git in the dust.

Like? This isn't explained, I'm curious on why I would want to use it, but this is just an empty platitude, doesn't really give me a reason to try.

replies(7): >>45084316 #>>45084327 #>>45084439 #>>45084678 #>>45088571 #>>45092597 #>>45093098 #
senekor ◴[] No.45084439[source]
Hi, author here. Since the target audience is people with little to no Git experience, a detailed comparison would not make sense. I did simply make that claim because the weirdness of Git's UI is usually justified by saying how powerful it is. So this statement is just intended to ease the readers mind that they're not missing out on power by choosing a tool that's easier to learn.
replies(3): >>45084539 #>>45084685 #>>45087146 #
jennyholzer ◴[] No.45084539[source]
I appreciate this perspective.

IMO, the authors and evangelists of Git are essentially correct when they argue about its power.

However, I think that it's extremely difficult to gain practical experience with using Git in a high-powered, high-agency way, mostly because there are a lot of abstract concepts at play and there is no easily accessible place where these concepts can be "discovered".

Basically, Git is as good as it's cracked up to be, but only if you're an expert.

If you're interested in becoming a Git expert, I cannot recommend Emacs Magit strongly enough.

If not, I think Jujutsu could be an quicker road to a high-agency version control workflow. It's at least worth considering. I feel confident that Jujutsu can succeed, in particular because of Git's harsh difficulty curve.

replies(3): >>45084724 #>>45087011 #>>45088109 #
senekor ◴[] No.45084724[source]
Thanks, but I consider myself a Git expert already :-) I read the Pro Git book cover to cover. I have a gluten-free, artisanal, free-range git config that I've grown and cared for over years. single character aliases all the important commands, "log all graph oneline", "commit amend no-edit", interactive rebase (ofc. with autosquash, autostash, updaterefs and rebasemerges), reset hard, push force-with-lease... Also: commit signing, url rewriting, conditional configs for different orgs, all that jazz. I was super productive with it and loved it.

And then Jujutsu came along and casually doubled my VCS productivity. I didn't see it coming!

replies(1): >>45085346 #
nocman ◴[] No.45085346[source]
Is there a particular pain point (or set of pain points) that you have using git which is removed when you use Jujutsu?

I am interested to know, because there seem to be a small number of people who really seem to like it, and up to this point I haven't been able to understand what it is that they are all so excited about.

replies(4): >>45085518 #>>45085779 #>>45087984 #>>45091664 #
BeetleB ◴[] No.45085779[source]
I would think the obvious answer is how jj deals with merge conflicts.

In git, if you get a conflict, you feel like you have to resolve it now.

With jj, most of the times I get merge conflicts, I simply ignore them and deal with them later. A conflict is not at all a blocker.

replies(2): >>45086184 #>>45086767 #
touristtam ◴[] No.45086184[source]
> With jj, most of the times I get merge conflicts, I simply ignore them and deal with them later.

Sorry? You what? How do you know which bit from which source goes where?

replies(1): >>45086227 #
1. BeetleB ◴[] No.45086227{3}[source]
Here's a typical scenario.

You do a git pull, just so your branch isn't so out of sync. Immediately you get merge conflicts. You then tell jj "Hey, I'll deal with this later", and make a branch off of the last commit that was conflict free and continue your work there. jj stores the conflict as is, but your branch is conflict free.

When you feel you have the energy to deal with the conflict, you switch to the branch that has the conflict, and fix the issue(s). Then you can manipulate the graph (rebase, whatever) so you can have everything in one branch - your changes and the changes you pulled in.

replies(3): >>45086667 #>>45087058 #>>45091805 #
2. 1718627440 ◴[] No.45086667[source]
So you essentially do a fast-forward until the first commit with a merge commit and then take the previous one?

Sounds like something that could also become a flag for git merge.

replies(2): >>45087968 #>>45088746 #
3. EMM_386 ◴[] No.45087058[source]
> When you feel you have the energy to deal with the conflict

So you just kick the can down the road and end up with possibly an even more difficult conflict resolution?

replies(2): >>45087653 #>>45088598 #
4. BeetleB ◴[] No.45087653[source]
> So you just kick the can down the road and end up with possibly an even more difficult conflict resolution?

That sentiment is true for pretty much anything in life one may decide to defer till later :-)

More concretely, it's often not hard to tell if deferring it will make it worse, or merely the same.

The whole point of version control is to give your mind some peace in not worrying about things ("Let's make this change and we can always revert if it doesn't work out"). Conflicts are no different. There's no fundamental reason a conflict needs to be treated like an emergency.

5. steveklabnik ◴[] No.45087968[source]
Git won’t let the portion of the branch that’s still conflicted remain in conflict while you go and work on the other part.
replies(1): >>45090471 #
6. sunshowers ◴[] No.45088598[source]
Or none at all, if you decide to abandon that work (as has happened to me a bunch).
7. riwsky ◴[] No.45088746[source]
No. The GP making a commit off of the first non-conflict isn’t the essence of the feature he’s talking about, just an example of what he can do next.

He’d also be free to edit upstream to not commit, or split a change in two so that parts unrelated to the conflict are in their own change. The big idea is that he doesn’t need to blindly decide that before seeing what the conflict is.

8. 1718627440 ◴[] No.45090471{3}[source]
I would just abort the conflict resolution.
replies(1): >>45096669 #
9. MangoToupe ◴[] No.45091805[source]
Isn't this equivalent to simply hard resetting to before the pull? (Or the commit before the conflict?) Plus then you don't end up with an extraneous branch.
10. steveklabnik ◴[] No.45096669{4}[source]
Then you’re back to the state before the rebase. Which is fine, the point is just that they’re not equivalent!
replies(1): >>45106167 #
11. 1718627440 ◴[] No.45106167{5}[source]
Yes. What's the equivalent would be to just keep the successfully rebased part. Right now you need to do keep the ref yourself.

> Sounds like something that could also become a flag for git merge.