Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Updating bookmarks

Reset your progress

To reset your progress, run this command:

curl https://s2p2.github.io/jj-for-everyone/reset.sh | bash -s update_bookmark
cd ~/jj-tutorial/repo

Creating a new bookmark for every commit is messy. A better approach is to move an existing bookmark to point to your new commits.

First, create a new commit. The -m flag (short for --message) provides the message directly.

printf "\nThis is a toy repository for learning Jujutsu.\n" >> README.md
jj commit -m "Add project description to readme"

jj log shows the new commit:

@  zzywylnt alice@local 2025-07-22 20:36:38 48708b9f
│  (empty) (no description set)
○  kxqyrwux alice@local 2025-07-22 20:36:38 git_head() 6ca38e90
│  Add project description to readme
◆  mkmqlnox alice@local 2025-07-22 20:25:40 main 7939d4cf
│  Add readme with project title
~

Now, move the main bookmark to this new commit. Here, @- is a useful shorthand for the parent of the working copy commit.

jj bookmark move main --to @-

Check the log again. Notice the two main entries:

  • main*: The local bookmark. The * indicates it's out of sync with the remote.
  • main@origin: The bookmark's location on the remote.
@  zzywylnt alice@local 2025-07-22 20:36:38 48708b9f
│  (empty) (no description set)
○  kxqyrwux alice@local 2025-07-22 20:36:38 main* git_head() 6ca38e90
│  Add project description to readme
◆  mkmqlnox alice@local 2025-07-22 20:25:40 main@origin 7939d4cf
│  Add readme with project title
~

To sync them, push the bookmark. Jujutsu is smart enough to push updated bookmarks by default.

jj git push

The original commit is not lost. Because each commit references its parent, pushing the main bookmark ensures the entire chain of ancestor commits is preserved on the remote.