Live data from Hacker News

Defeating Git Rigour Fatigue with Jujutsu

ikesau.co

61–70 of 193 posts

Re: Defeating Git Rigour Fatigue with Jujutsu

#61

> Latter commits overwrite work that was done in earlier commits and the story breaks. > Some people prefer this, as it helps git bisect work better. Debuggability versus reviewer convenience is the tradeoff, I guess. Ideally we would have a VCS that made ergonomic to store both history-as-it-happened for some purposes, and the cleaned up, squashed and rebased history for other purposes, ensuring they match

Just squash all the PR commits into one when it gets merged to main or whatever your main branch is.

You can revisit the original PR to see the individual commits if you really want.

Re: Defeating Git Rigour Fatigue with Jujutsu

#62
post #7

Earlier quoted context omitted.

I think jj will never gain momentum because people only have a git mental model at this point, so won't be able to effectively reason about jj.

I spoke about this before, but jj has the Blub Paradox problem, from the pg's essay Beating the Averages ( https://paulgraham.com/avg.html ). Yes, you can do most commit manipulations with git just like with jj. But, users of jj know they're "looking down the power continuum" (to reuse pg's terminology) when they look at git, whereas git users cannot fathom what's exactly the deal with jj. Unfortunately, the only way…

It's interesting that even clear advantages like `jj undo` are hard to communicate because of this.

Re: Defeating Git Rigour Fatigue with Jujutsu

#63
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…

You don’t need easy named branches. Naming branches is a chore: since you already spend time writing commit messages, branch names are just a summarization of your commit messages but with more character restrictions.

That’s why I always use jj’s automatic commit identifiers. They are short and I don’t waste brain cycles naming things that are ephemeral. When I push, I let jj automatically creates, updates, and deletes remote git branches (`jj git push -c` for creation, plain `jj git push` for updates, `jj git push --deleted` for deletions). I do not ever have to think about branch names and it is great!

Re: Defeating Git Rigour Fatigue with Jujutsu

#64
post #45
post #25

Earlier quoted context omitted.

> 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.

How does it just auto-rebase everything without failing though? If you edit something later commits depend on, then you get merge conflicts. Are you implying that jj just automatically handles all this?

Re: Defeating Git Rigour Fatigue with Jujutsu

#65
post #10
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 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?

I think I said named branches, but that is definitely what I mean. I find it strange that people want to work on anonymous branches, but to each their own. I don't so that has no appeal to me.

I often work on something and then switch away to something else. it might be a week before i get back to it, and the name of the branch is a clue as to what the heck I was doing.

Other people often need to check out a branch I'm working on to help. How does anonymous branching help anyone except a solo developer?

Re: Defeating Git Rigour Fatigue with Jujutsu

#66
post #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?

I make a commit and the branch doesn't follow it. Bookmark, whatever. That is never a behavior I would want. What purpose does it serve?

Re: Defeating Git Rigour Fatigue with Jujutsu

#67
post #59
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 remember being the big innovation over svn being merging. There were others things, obviously, but the distributed model + easy merges is what I remember.

Yes, that's true, merging. Which is what made branching a reasonable thing to do.

Re: Defeating Git Rigour Fatigue with Jujutsu

#70
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 don't try to reimplement the git workflow on top of Jujutsu. I like it because I can let go of a bunch of annoying noise that I needed in Git. I like it because rebases don't have to be synchronous and modal. I like it because I can easily edit history, rearrange the commit graph, change commit descriptions, duplicate, and so much more, and even remotely (without having to checkout first). There's so much to love t…

That's great that it has things you like. I don't do rebasing, except on MRs where I've come to prefer squashing the branch being committed.

But I don't rewrite history. It's history. While I can understand people have reasons to do it, the reasons have never resonated with me. I'd rather spend my time getting new work done and not polishing work I've already done.

Post reply on HN