Defeating Git Rigour Fatigue with Jujutsu

(ikesau.co)

28 points | by ikesau 3 hours ago

6 comments

  • winterqt 5 minutes ago
    > `absorb` assigns the changes based on whichever previous commit most recently touched those files, which sometimes doesn't actually correspond to which commit should own these particular changes.

    I’m pretty sure `jj absorb` (and its predecessors, `git-absorb` [0] and `hg absorb`) are smarter than this, instead looking at the actual diffs.

    [0]: https://github.com/tummychow/git-absorb

  • mcookly 1 minute ago
    I'm not an expert in Magit by any means, but I bet there's a way to accomplish this in only a few keystrokes.
  • y1n0 14 minutes ago
    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 work with that. I have numerous branches in flight at any given time, and my colleagues do as well. The idea of manually keeping them pointed at the right commit is just nuts.

    Maybe they've fixed that astonishing choice since then, and I'd give things another go if they did. But branches and worktrees are how I operate.

    Regarding the article, I have no idea what is going on as I'm red-green color deficient.

    • jolux 4 minutes ago
      I assume you mean named branches (bookmarks in jj)? Because anonymous branches in jj are trivial: you just `jj new <parent_change_id>` 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?

  • diath 12 minutes ago
    So... git rebase -i?
  • jonathanyc 12 minutes ago
    I have been walking some newer programmers through Git recently, so this topic is fresh on my mind. The commands in the blog post do not look friendlier or even different.
  • mi_lk 10 minutes ago
    So: Squash everything together then pick each component out by squash -i to an empty commit.

    Seems straightforward, wouldn’t call it special

    • nomel 8 minutes ago
      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.