Ju Ju Tsu A book about jj / jujutstu
arialdo.codeberg.page
arialdo.codeberg.page
Just wanted to note, before I forget, that there is a typo @ https://arialdo.codeberg.page/ju-ju-tsu/preface/at-a-glance....
Impatietn —> Impatient
The book looks well done and a labor of love, but the #1 issue Git users have, merge conflicts, isn't discussed until chapter 13 (reminds me of a Neovim tutorial I read recently where "editing text" isn't until chapter 6).
Wot? You're holding it wrong. With jj you use raw hashes far less than git.
When you start, you use bookmarks mostly because your using as alternate porcelain git and still thinking in terms of git HEAD. Later you will grow comfortable with stacks of changes, and then you will start using change-id's (not SHA1's). Much later, you will learn revset's, and create a few revset aliases of your own, and be moving around the commit tree so fast a git person looking on won't understand what's happening. Then, one day, you will be forced to move back to git, try do to something, and wonder how you every did anything with it and hate every minute you are forced to use it. That's over a year away.
I never, during daily driving, use hashes in git, it's all branch names. If I'm using hashes it's because something went quite wrong and I'm into https://xkcd.com/1597/ territory. Why would I want to move whatever a "revset" is around commits? Doesn't that just... break the point of a commit as a confirmed set of changes?
JJ seems like a thing for people who like managing code vs writing it.
No, I'm serious. jj doesn't have git commands you use regularly, like commit and add. It does them automagically. Most rebases happen that way as well. If your goal is to spend less time screwing around, typing VCS CLI commands, use jj.
But it will be less time only in the long term. In the very short term you will flounder around just like you did when you started out with git, which you used "rm -r repo; git clone ssh://../repo" to recover. (No need for that in jj, because "jj undo" works for all jj commands. Consequently unlike git no jj command can lose information.) Then you will spend months using it as alternate git porcelain. It's only after the many more months it takes to absorb its ways via osmosis that you start using it the way its makers intended.
You said you used it for a few hours. If so, you didn't get very far into the floundering stage, let alone start to work your way out of it. You need to be decidedly more persistent than that to become familiar with any new tool. Until you do, "you're holding it wrong" is a pretty accurate description of why it didn't work for you.
Git didn't take me hours to figure out while floundering, you `git add .`, `git commit -a -m "hello!"`, `git push` and it's instantly useful for doing the basics of making sure your code is somewhere else besides your laptop. The rest is details and comes up only when you need it.
"It's only after the many more months it takes to absorb its ways via osmosis that you start using it the way its makers intended." This is an insane take, and means jj will never take off (I will bet a large amount of money on it). Even with Vim or Emacs you can start writing within the first hour of opening it.
Fair enough, but I suspect in this case it's your previous experiences with VCS that make it take more than a few hours. JJ is actually simpler than git. There is no staging, no committing, less need for rebase, undo just works, it has better history - lots of things. The need to learn all those git concepts disappears with JJ. For a new user that makes life easier. But someone who comes from git has to unlearn a lot of things before they can adjust to the JJ mindset.
If all you ever do in git is "git pull; git add -A; git commit -a -m ...; git push", then switching to JJ is hard justify. Dropping the need to type "git add -A; git commit -a -m ..." isn't a big win. That's all most people do, so I expect most won't change.
But there is a reason that's all most people do in git - it's because everything else is far more messy, and dangerous. If you haven't lost work to "git reset --hard", you haven't been using git for long. Once you notice it easy to do more in JJ, things like breaking up big PR's in a series of commits that spell out a narrative of how you got from A to B, which eases the burden on the reviewer, become downright easy. Shuffling code between commits to achieve that in git is a right proper PITA, so JJ users tend to have a much tidier commit history.
That change only happens when you've become so familiar with JJ concepts, you are no longer "thinking in git", so much so the shift back to git's CLI becomes painful. It takes months. Until you get that payback, the switch is wasted time.
> If you haven't lost work to "git reset --hard"
I haven't, because why would I ever need to run that? I've reverted individual files, but never a full repo (I've been working with Git for 15 years)