Live data from Hacker News

Defeating Git Rigour Fatigue with Jujutsu

ikesau.co

41–50 of 193 posts

Re: Defeating Git Rigour Fatigue with Jujutsu

#41
post #30

Earlier quoted context omitted.

There’s nothing stopping you from using separate changes to emulate the staging area if you want.

I can, but I don’t need to. jj has nothing I need, so it would be changes for the sake of changes. I’m not saying it’s bad, but people do need to realize that their struggles are theirs, not the whole world.

Totally fair :) personally I used to be a git wizard and I am relieved at how much about it I’ve been able to forget since learning jj, but I understand not everyone has the same experience.

Re: Defeating Git Rigour Fatigue with Jujutsu

#42
post #32
post #10

Earlier quoted context omitted.

I assume you mean named branches (bookmarks in jj)? Because anonymous branches in jj are trivial: you just `jj new ` and you have a new branch. Bookmarks aren’t that bad either IMO, especially with the recent addition of `jj bookmark advance`. Curious if you can say more about the particular difficulties you found keeping them up to date?

Imagine that you use jj, while everyone else who works on the repo along with you uses regular git. Is it easy?

Yes, that is the case for almost every repo I’ve ever used jj for. It is a complete non-issue. There is virtually zero friction.

Re: Defeating Git Rigour Fatigue with Jujutsu

#43
post #3

So... git rebase -i?

No, more like: git rebase -i # squash all the commits (e.g. in vim with ctrl-v) git reset HEAD^ git add -p # interactively pickup the RED hunks git ci -m RED The main difference to jj is that the RED commit is created later with git.

But isn't the flow nearly identical with jj, because the key part, the moving of hunks, is interactive (aka manual) anyway?

Re: Defeating Git Rigour Fatigue with Jujutsu

#44
post #2

I don't get why people like jujutsu. I tried it for a while but I work with a quite a few people in the same repo and I need easy named branches that keep up with commits. For all the many problems in git, branches are dead easy. That was the big innovation over svn at the time. Last time I tried jj, branches were an extremely laborious process to keep up to date. I don't see how people that aren't working alone can…

I’ll be honest, as a long-time jj user, I actually haven’t the foggiest what you’re talking about with branches being laborious to keep up to date. Can you elaborate?

Re: Defeating Git Rigour Fatigue with Jujutsu

#45
post #25
post #6

Earlier quoted context omitted.

Definitely not. Switch to a previous commit, make edits, changes propagate into the future commits (including into a git repo if you wish [1]) Jj is not git and is not a git tool, it just (thankfully) uses git as a backend, so you can still carry on with the rest of the world. [1] https://news.ycombinator.com/item?id=47765759

> Switch to a previous commit, make edits, changes propagate into the future commits In what way is that different from using `git rebase -i` to edit a commit?

You can literally jump into a commit and edit its contents directly, and everything is auto-rebased on top.

There are no modal “sorry rebase failed, best of luck” gotchas. There are no “oops I put the wrong thing in the wrong part of the rebase and now I have to abort and start all over” gotchas.

It’s rebase, but without all the extra work, mental overhead, failure cases, and effort.

Re: Defeating Git Rigour Fatigue with Jujutsu

#46
This seems like a lot more effort than the (to me) more natural jj workflow of maintaining the idealized series of commits plus a working commit on top. As you make tweaks and fixes you just squash the relevant parts into the already-clean history.

Basically, if you don’t get into that sort of situation with commits containing parts they shouldn’t in the first place, you don’t need to do any extra work to clean them up. The tip of your branch should be the only “messy” part.

Re: Defeating Git Rigour Fatigue with Jujutsu

#47
post #46

This seems like a lot more effort than the (to me) more natural jj workflow of maintaining the idealized series of commits plus a working commit on top. As you make tweaks and fixes you just squash the relevant parts into the already-clean history. Basically, if you don’t get into that sort of situation with commits containing parts they shouldn’t in the first place, you don’t need to do any extra work to clean them…

That is a lot of discipline up front. I am sure there are problems which are nicely bucketed, but I usually have to go with the flow and make changes as I see them. I want to keep working with the code, not babysitting version control as I focus on getting the initial version to work.

Re: Defeating Git Rigour Fatigue with Jujutsu

#48
post #32
post #10

Earlier quoted context omitted.

I assume you mean named branches (bookmarks in jj)? Because anonymous branches in jj are trivial: you just `jj new ` and you have a new branch. Bookmarks aren’t that bad either IMO, especially with the recent addition of `jj bookmark advance`. Curious if you can say more about the particular difficulties you found keeping them up to date?

Imagine that you use jj, while everyone else who works on the repo along with you uses regular git. Is it easy?

yeah nobody "has to know", especially if everyone else is also rebasing etc constantly.

Re: Defeating Git Rigour Fatigue with Jujutsu

#50

The only thing that stops me from switching to jujutsu is that lazygit already paves through all these paper cuts pretty well, and I'd miss their custom patches feature. I see there's a similar project for JJ, but it doesn't seem nearly as polished https://github.com/Cretezy/lazyjj

Jjui is the best tui for jj
Post reply on HN