jj-log
Show commit history
TLDR
Show revision history as a graph
Show only given revsets (e.g. B::D, A..D, B|C|D, etc.)
Show log with a particular template for each line (e.g. 5 characters of commit hash and author)
SYNOPSIS
jj log [OPTIONS] [REVISIONS]
PARAMETERS
-r, --revisions <REVSET>
Show only specified revisions matching revset
--graph
Display graph of changes (default)
--no-graph
Disable graph display
--limit <LIMIT>
Limit number of revisions shown
--all
Show all revisions, not just main branch
--branches
Show all branches
-p, --patch
Show patches for changes
--summary
Show summary line with stats
--template <TEMPLATE>
Custom output template
--color <WHEN>
Control color output (always/never/auto)
--repository <PATH>
Repository path
--help
Show help
DESCRIPTION
jj log is a core command in Jujutsu (jj), a Git-compatible distributed version control system designed for better usability and performance. It renders a visual representation of the repository's commit history as a directed acyclic graph (DAG), showing commits, branches, and changes over time.
Unlike traditional tools, Jujutsu uses an operation-based model where changes are recorded as immutable operations on a working copy, enabling features like automatic rebasing and concurrent work. The log displays revisions with details like author, date, description, and change counts. By default, it shows the main branch history with a graph view using ASCII art for edges.
Users can filter by revisions, limit output, or customize with templates. It's ideal for navigating complex histories, inspecting changes, and understanding repository state. Output supports color for readability and can pipe to pagers. Essential for jj workflows, it integrates seamlessly with other jj commands like jj diff or jj show.
CAVEATS
Requires Jujutsu installation; not a core Linux utility. Revsets use jj syntax, not Git. Large repos may slow rendering.
EXAMPLE
jj log -r 'branch(main)' --limit 10
Shows last 10 commits on main branch with graph.
REVSETS
Powerful query language: roots(), children('rev'), draft(), @ for working copy.
HISTORY
Developed by Martin von Zweigbergk as part of Jujutsu (first release 0.1.0 in 2022). Evolved from hg-log influences, optimized for jj's concurrent operation model. Widely used in jj workflows since v0.5+ for improved UX over Git.
SEE ALSO
git-log(1), hg log(1)


