-
Notifications
You must be signed in to change notification settings - Fork 54
Description
Hi, I am working through the tutorial (which is great btw, thank you for doing this) and I came across a question that threw me for a whirl.
In the tutorial there's a step that pushes your change to github: "Anyway, let's push trunk up to GitHub:". The log before this step looks something like this:
❯ jj log --limit 4
@ vnnqpzrl [email protected] 2025-11-17 22:42:22 trunk 150dc6f1
│ remove goodbye message
○ lstyoomw [email protected] 2025-11-17 19:27:00 git_head() da214586
│ refactor printing
○ pvtrmkut [email protected] 2025-11-17 19:09:15 f097d68f
│ (empty) add better documentation
○ xtpkorwx [email protected] 2025-11-17 19:00:12 71f5ac39
│ create hello and goodbye functions
after the push the log looks like this:
❯ jj log --limit 4
@ yksvmvwl [email protected] 2025-11-17 22:56:08 19ff4a92
│ (empty) (no description set)
◆ vnnqpzrl [email protected] 2025-11-17 22:42:22 trunk git_head() 150dc6f1
│ remove goodbye message
~
My first thought was "what happened to my other changes" and "why does log now only show two changes?".
It took me a while to find out since (as far as I could gather) it's not obvious what happened.
jj log is high-level overview of what's currently active (mutable). When we push up our commit all the ancestors of it become immutable (no longer active). I can verify this by running jj log -r 'all()' and seeing all the ◆ icons for the other commits. (I hope I have this correct).
I believe this section is missing some explanation on this behavior and what jj log is actually doing since by this point the user is accustomed to having a lengthy log and after the push it's dramatically limited to two commits.