Live data from Hacker News

Switch to Jujutsu Already: A Tutorial

stavros.io

61–70 of 164 posts

Re: Switch to Jujutsu Already: A Tutorial

#61
post #33

I use a gui for 90% of my workflows. Another 9 percent points are hitting back in my console history to rerun commands, never mind if git or jj or POSIX that affect my working dir or index state. What am I supposed to do, use the UI plus jj, and prompt an LLM to use which: git, or jj, in case I am too lazy to think of the right command in the remaining one percent of cases? But in general, I like the "less states and…

use jjui - its an absolute pleasure to use as you dont need to know anything beyond arrow keys and some keyboard shortcuts (which you can also find in the ? help menu). https://github.com/idursun/jjui

If it doesnt do anything you already need, then the maintainer is likely to add it quickly - its rare to find someone so responsive

Re: Switch to Jujutsu Already: A Tutorial

#62

I just don't have enough pain points with Git to move to something new. I don't have a problem remembering the ~5 commands I need most on any given workday. Between stashes, branches, temporary commits I later rebase, and recently worktrees, I don't lack for anything in my usage. It's universally used across both my public and corporate life, and neither does anyone need to learn a new tool to interact with my code b…

If you've ever lived in a world of stacked commits with develop on main (i.e. not gitflow, no feature branches), combined with code review for every commit, git will soon start to aggravate you. Git doesn't make rebasing a chain or tree of commits pleasant. Git records merge resolutions and can reuse them, but it doesn't do the same thing for rebases, making them more repetitive and tedious than they should be. When you address comments on earlier commits in a chain, you need to rebase after. Git's affordances for rebasing aren't great.

And when you rebase, the commits lose their identity since commit hashes are content-addressed, despite having an identity in people's minds - a new revision of a commit under review is usually logically the same unit of change, but git doesn't have a way of expressing this.

jj, as I understand it, addresses these pains directly.

Re: Switch to Jujutsu Already: A Tutorial

#63
post #6

> Jujutsu, in contrast, is more like playing with Play-Doh. You take a lump, cut it into two, shape one piece into something, give it a name, change your mind, give it another name, take a bit of the second piece and stick it on the first piece, and generally go back and forth all around your play area, making changes. I love this description and it describes how I work with git. When I’m doing things locally I’m con…

I think you would love jj then. It is dead-simple to just move things around - branches/bookmarks, commits and even single lines of code within a diff.

jjui (https://github.com/idursun/jjui) makes it all that much easier too

Re: Switch to Jujutsu Already: A Tutorial

#65

I have primarily used git in the terminal for more than a decade. I also used magit when I was primarily working in emacs (magit's great!). I now primarily use lazygit. While I'm not a fan of the whole UI, this is the only git tool that makes me go super fast while creating a near-perfect commit history. I tried using jj but immediately stopped after installation as it required a learning curve that I wasn't ready to…

you might consider trying again, but do so with jjui (https://github.com/idursun/jjui) - very similar concept to lazygit and makes working with (the already simple) jj even more seamless and intuitive

Re: Switch to Jujutsu Already: A Tutorial

#66
post #38

Earlier quoted context omitted.

Well you can either have a viewpoint of "the current thing I use is fine because I'm used to the warts" or "it's not fine because other things exist". It can't be that SVN is bad and git is better but also that git is fine even though jj is better.

Except that it has to first be true that jj is better ;) You start out the article with hate for git without explaining what you actually don't like, then here on HN say "I don't hate git". A command called `fuckgit`? Because you need to re-clone? What are the things you commonly do that require this? I've never encountered it. Maybe you're just too advanced a user for git and jj really is better for you. But for us…

> You start out the article with hate for git without explaining what you actually don't like

I start out the article saying I never understood git, and why does it matter what I don't like? That would only matter if I were trying to say that git is bad, but I'm not making a comparison. I just think jj is better-designed, and that you should try it.

> Some of the benefits you tout, like "editing a commit and you don't need to commit it yourself"?

I never said that's a benefit, I just said that's something jj does differently. I `jj commit` when I'm done with some work anyway.

> It also breaks your "you need to stash" argument. I don't stash. I just commit if I have something WIP that needs saving while I work on some other emergency.

In that case, you'll like jj, as it handles all that for you.

Your comment is coming off as a bit defensive, I didn't write my article to attack git. If you like git, keep using it, I prefer jj and I think other people will too. It's hard to get started with because its workflow is different from what we're used to, so I wrote the tutorial to help.

Re: Switch to Jujutsu Already: A Tutorial

#67
what im most impressed by when I read the comments to jj-related threads is how many people are handwriting assembly code.

I come to this conclusion because there's always a large amount of people saying "if you dont understand, let alone have mastered, git, then you dont get to have an opinion"

So, clearly these people similarly dont use ease-of-use abstractions like programming languages

Re: Switch to Jujutsu Already: A Tutorial

#68
post #43
post #24

Earlier quoted context omitted.

> I don't hate git Idk man, the first two paragraphs of the article very much make it sound like you hate git. > Over the past few years, I’ve been seeing people rave about Jujutsu, and I always wanted to try it, but it never seemed worth the trouble, even though I hate git.

Also: > I don't hate git but > I have my trusty alias, fuckgit Someone who doesn't hate git would have named this alias quite differently...

I read that more as "aw, fuck it, I'm starting over". Then, given what it's doing, "fuck it" -> "fuckgit" makes sense.

But hey, it's not my alias. I'm just saying that the way I read it didn't suggest hate, just a little cleverness. I can't speak for what the author was thinking.

Re: Switch to Jujutsu Already: A Tutorial

#69
post #40

In the past 2 months, I saw 3 articles about JJ. Always the same starting point: "I don't understand how git works". If you can't understand git, one of the most used tool in the whole industry, this is a *you* problem. You MUST take the time to understand how it works properly. Every job you'll get and every projects you'll work on will use a Version Control (at least I hope). Abstracting this knowledge by using a t…

"if some students fail the test, the problem is of the students, if many do, is of the teacher".

Git is a bad teacher. There are a lot of things that are profound yet easy to grasp when learned and other things are called bad products. Git is one of them.

Re: Switch to Jujutsu Already: A Tutorial

#70
post #65

I have primarily used git in the terminal for more than a decade. I also used magit when I was primarily working in emacs (magit's great!). I now primarily use lazygit. While I'm not a fan of the whole UI, this is the only git tool that makes me go super fast while creating a near-perfect commit history. I tried using jj but immediately stopped after installation as it required a learning curve that I wasn't ready to…

you might consider trying again, but do so with jjui ( https://github.com/idursun/jjui ) - very similar concept to lazygit and makes working with (the already simple) jj even more seamless and intuitive

thanks!
Post reply on HN