jj-bookmark
Manage named commit bookmarks
TLDR
Create a new bookmark at the given revision
List all existing bookmarks and their targets
Move an existing bookmark to another revision
Track given remote bookmarks
Delete a bookmark, and propagate the deletion to remotes on the next push
Forget a bookmark locally, without marking its deletion to be pushed
SYNOPSIS
jj bookmark [OPTIONS] [BOOKMARKS]...
PARAMETERS
-d, --delete
Delete the specified bookmarks instead of moving them (mutually exclusive with tracking)
-D, --delete-all
Delete all bookmarks
-r, --at-rev <REV>
Move bookmarks to this revision instead of working-copy commit
-R, --remote <REMOTE>
Operate on remote bookmarks from the given remote (list/track/delete)
--track <REV>
Make bookmark track changes to the given revision (mutually exclusive with --delete)
DESCRIPTION
The jj bookmark command is part of Jujutsu (jj), a Git-compatible version control system designed for better usability and performance. Bookmarks in jj are mutable named pointers to commits, similar to Git branches but with key differences: they can point to multiple commits via "conflict commits" and are advanced explicitly rather than via implicit tracking.
Without arguments, jj bookmark lists all bookmarks in a concise table showing name, status (e.g., diverged, moved), and commit ID. Providing bookmark names moves them to the current working-copy commit (or specified revision). Multiple bookmarks can be advanced together, with the last argument treated as the target revision if it's a revset.
Common uses include creating (jj bookmark create name, though create is via moving from @), advancing during development, deleting unneeded ones, and managing remote bookmarks. Unlike Git, jj encourages explicit bookmark operations, avoiding automatic branch creation. This promotes clearer history and easier collaboration.
Bookmarks support tracking specific revisions and remote syncing, making it powerful for polyglot workflows.
CAVEATS
Bookmarks are local by default; use git-push/git-fetch or jj git push/fetch for remotes. Moving bookmarks doesn't create merge commits. Conflicts in bookmarks result in "bookmark conflicts" resolvable via jj resolve.
EXAMPLES
jj bookmark # List bookmarks
jj bookmark main # Advance 'main' to working copy
jj bookmark -d feature # Delete 'feature'
jj bookmark foo bar @- # Move 'foo' to 'bar', advance 'bar' to parent of working copy
CONFIGURATION
Customize via [bookmark] section in .gitconfig or jj config, e.g., auto-tracking or default remotes.
HISTORY
Introduced in Jujutsu 0.1.0 (2022) by Martin von Zweigbergk at Google. Evolved to support Git compatibility and advanced features like automatic tracking in later versions (0.18+). Actively developed as open-source on Sourcehut.
SEE ALSO
jj(1), git-branch(1), jj-log(1)


