Jj First Time

This is an LLM ass-isted document,
as are all in this subdirectory.

This is the one-time setup that made jj git push work in this repository without extra flags or bookmark fiddling. It is written down so it can be reproduced in a fresh clone.

1. Why it does not "just work" out of the box

In Jujutsu a bookmark is a named pointer to a commit, like a Git branch, but unlike a Git branch it does not move forward by itself when you commit1. jj git push only pushes bookmarks that are tracked and that are ahead of their remote counterpart. So after

jj commit -m "some work"

the local master bookmark still points at the previous commit, and a plain jj git push reports:

Warning: No bookmarks/tags found in the default push revset:
remote_bookmarks(remote=origin)..@

The usual fix is to move the bookmark by hand every time:

jj bookmark advance master    # or: jj bookmark set master -r @-
jj git push

2. The setup used here

For a simple single-bookmark repository like this one, the experimental "advance branches" feature can move the bookmark for us2. The repo-local configuration is:

[experimental-advance-branches]
enabled-branches = ["master"]
disabled-branches = []

set with:

jj config set --repo experimental-advance-branches.enabled-branches '["master"]'
jj config set --repo experimental-advance-branches.disabled-branches '[]'

Now jj commit advances master to the commit it just created, and a plain jj git push pushes it.

The feature only advances a bookmark that already points at the working copy's parent (@-)3; it will not skip a bookmark forward from an older commit. So when adopting this, align master with the tip once:

jj bookmark set master -r @-

After that every new commit keeps it there. (This was needed here because master was still three commits behind.)

The bookmark must also be tracked. When a workspace is cloned or initialised this is normally automatic for the default branch; otherwise:

jj bookmark track master@origin

3. Everyday commands

jj st                 # status of the working-copy commit
jj diff               # what changed
jj log                # history / bookmark position
jj commit -m "..."    # describe @ and start a new empty @ on top
jj git push           # push master (tracked) to origin
jj git fetch          # update remote bookmarks

The working copy is itself a commit. Edits are snapshotted automatically, so there is no staging area.

4. Caveats

  • experimental-advance-branches.enabled-branches is experimental. It advances every matching bookmark that is an ancestor of the new commit, which is fine while master is the only bookmark here. If more bookmarks appear, list them explicitly or fall back to jj bookmark advance4.
  • Jujutsu refuses to push commits with an empty description. Describe them, squash them, or pass --allow-empty-description.
  • The configuration lives in ~/.config/jj/repos/<id>/config.toml (repo scope), so it is per working copy, not committed to Git.

October, 2026.

Sequel, for when habit wins and bare Git commits anyway: JjVsGitHabit.

Footnotes:

1

Jujutsu documentation, Using Jujutsu with GitHub and GitLab Projects, https://docs.jj-vcs.dev/latest/github; and the neugierig.org tech notes, Understanding Jujutsu bookmarks, https://neugierig.org/software/blog/2025/08/jj-bookmarks.html, for the local-versus-tracking distinction.

2

The sample configuration in jj-vcs/jj discussion #3549, Feedback for the experimental advance-branches feature, https://github.com/jj-vcs/jj/discussions/3549; the option itself is documented in cli/src/config-schema.json for jj 0.45.1, https://github.com/jj-vcs/jj/blob/v0.45.1/cli/src/config-schema.json. The long-running wish for this behaviour is jj-vcs/jj issue #2338, https://github.com/jj-vcs/jj/issues/2338, also flagged by Steve Klabnik on Hacker News, https://news.ycombinator.com/item?id=45677946.

3

Maintainer clarification in discussion #3549: it advances the bookmark at @- to @ before the new commit is created.

4

André Arko, stupid jj tricks, https://andre.arko.net/2025/09/28/stupid-jj-tricks, for the tug alias and the closest_pushable revset; the jj bookmark advance defaults come from the Configuration page, https://docs.jj-vcs.dev/latest/config.