Live data from Hacker News

Steve's Jujutsu Tutorial

steveklabnik.github.io

11–20 of 120 posts

Re: Steve's Jujutsu Tutorial

#11
post #10

Earlier quoted context omitted.

I like jj because I like git's index so much. JJ lets me do what git's index does, but in a much more powerful way. What you do is, you treat @ like the index, and you work on @-. This is the "squash workflow" https://steveklabnik.github.io/jujutsu-tutorial/real-world-w...

[flagged]

https://steveklabnik.github.io/jujutsu-tutorial/hello-world/...

> The very first character at the top left is an @. @ is a special name for "whichever commit the working copy reflects." At first I kind of thought about it like HEAD in git, but that's not correct: HEAD is the most recent commit, but @ represents the working copy, which may be "dirty" from git's point of view. This is our first glimpse into the power of the index-less workflow, though we'll explore that fully in the next chapter. For this moment, just realize that we have one less concept, but haven't actually lost any of its power.

Re: Steve's Jujutsu Tutorial

#12
post #10

Earlier quoted context omitted.

[flagged]

https://steveklabnik.github.io/jujutsu-tutorial/hello-world/... > The very first character at the top left is an @. @ is a special name for "whichever commit the working copy reflects." At first I kind of thought about it like HEAD in git, but that's not correct: HEAD is the most recent commit, but @ represents the working copy, which may be "dirty" from git's point of view. This is our first glimpse into the power o…

OK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes

Re: Steve's Jujutsu Tutorial

#13
post #12

Earlier quoted context omitted.

https://steveklabnik.github.io/jujutsu-tutorial/hello-world/... > The very first character at the top left is an @. @ is a special name for "whichever commit the working copy reflects." At first I kind of thought about it like HEAD in git, but that's not correct: HEAD is the most recent commit, but @ represents the working copy, which may be "dirty" from git's point of view. This is our first glimpse into the power o…

OK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes

No, because `jj git push` only pushes bookmarks. If you `jj git push -c @` or create a bookmark, yeah, you will push the current commit, but then you're asking for that pretty explicitly.

Re: Steve's Jujutsu Tutorial

#14
post #3

Steve wrote this in a very approachable style. It is the first time I really understood what 'jj' is about. I'm actually kind of excited to start using this tool with my git repos.

Thanks so much! Just want to point out that this hasn’t been updated in a minute, and in particular, you’ll get some messages about branches being bookmarks now: https://github.com/steveklabnik/jujutsu-tutorial/pull/34 I have started on a second iteration of the tutorial in private, and am gonna see if I can get it in shape this weekend. Happy to answer questions about jj!

Does "in a minute" mean "not for a long time"? Because that's how my kids use that phrase.

English is so great and so confusing!

Re: Steve's Jujutsu Tutorial

#16
I’ve started to use jj much more often (and actually used this tutorial to get me started!). I do wish its interaction with Nix flakes is less annoying though, but that’s not the fault jj.

Re: Steve's Jujutsu Tutorial

#17
post #12

Earlier quoted context omitted.

https://steveklabnik.github.io/jujutsu-tutorial/hello-world/... > The very first character at the top left is an @. @ is a special name for "whichever commit the working copy reflects." At first I kind of thought about it like HEAD in git, but that's not correct: HEAD is the most recent commit, but @ represents the working copy, which may be "dirty" from git's point of view. This is our first glimpse into the power o…

OK but again thats awful, because @ IS A COMMIT, so you are only a "git push" away from accidentally pushing arbitrary garbage instead of proper changes

Bookmarks in JJ are closer to tags than branches. They aren’t updated whenever you add new commits on top of the bookmark.

If you assign your bookmark to the current commit, yes, and I have done that before. But it’s very easy to not do that, and if you push the wrong commit (a WIP commit, let’s say) you can reassign the bookmark and then push again. It’s not a big deal to push arbitrary garbage to the remote if you do, and it’s not common that I do.

On the flip side, jj has been remarkably useful at ensuring I never ever, ever lose any of my work. Ever. It’s not an issue that often, but when it is, oh thank god

Re: Steve's Jujutsu Tutorial

#19

Earlier quoted context omitted.

Thanks so much! Just want to point out that this hasn’t been updated in a minute, and in particular, you’ll get some messages about branches being bookmarks now: https://github.com/steveklabnik/jujutsu-tutorial/pull/34 I have started on a second iteration of the tutorial in private, and am gonna see if I can get it in shape this weekend. Happy to answer questions about jj!

Does "in a minute" mean "not for a long time"? Because that's how my kids use that phrase. English is so great and so confusing!

It means both "in a long time" and "in a short time", depending on context and intonation.
Post reply on HN