jj/latest/config/index.html

4489 lines
175 KiB
HTML

<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<link rel="canonical" href="https://jj-vcs.github.io/jj/latest/config/">
<link rel="prev" href="../glossary/">
<link rel="next" href="../filesets/">
<link rel="icon" href="../images/favicon-96x96.png">
<meta name="generator" content="mkdocs-1.6.1, mkdocs-material-9.6.4">
<title>Settings - Jujutsu docs</title>
<link rel="stylesheet" href="../assets/stylesheets/main.8608ea7d.min.css">
<link rel="stylesheet" href="../assets/stylesheets/palette.06af60db.min.css">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,300i,400,400i,700,700i%7CRoboto+Mono:400,400i,700,700i&display=fallback">
<style>:root{--md-text-font:"Roboto";--md-code-font:"Roboto Mono"}</style>
<script>__md_scope=new URL("..",location),__md_hash=e=>[...e].reduce(((e,_)=>(e<<5)-e+_.charCodeAt(0)),0),__md_get=(e,_=localStorage,t=__md_scope)=>JSON.parse(_.getItem(t.pathname+"."+e)),__md_set=(e,_,t=localStorage,a=__md_scope)=>{try{t.setItem(a.pathname+"."+e,JSON.stringify(_))}catch(e){}}</script>
</head>
<body dir="ltr" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo">
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
<label class="md-overlay" for="__drawer"></label>
<div data-md-component="skip">
<a href="#configuration" class="md-skip">
Skip to content
</a>
</div>
<div data-md-component="announce">
</div>
<div data-md-color-scheme="default" data-md-component="outdated" hidden>
</div>
<header class="md-header md-header--shadow" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href=".." title="Jujutsu docs" class="md-header__button md-logo" aria-label="Jujutsu docs" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a>
<label class="md-header__button md-icon" for="__drawer">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"/></svg>
</label>
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
Jujutsu docs
</span>
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Settings
</span>
</div>
</div>
</div>
<form class="md-header__option" data-md-component="palette">
<input class="md-option" data-md-color-media="(prefers-color-scheme)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to system preference" type="radio" name="__palette" id="__palette_0">
<label class="md-header__button md-icon" title="Switch to system preference" for="__palette_1" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="m14.3 16-.7-2h-3.2l-.7 2H7.8L11 7h2l3.2 9zM20 8.69V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12zm-9.15 3.96h2.3L12 9z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: light)" data-md-color-scheme="default" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to light mode" type="radio" name="__palette" id="__palette_1">
<label class="md-header__button md-icon" title="Switch to light mode" for="__palette_2" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a4 4 0 0 0-4 4 4 4 0 0 0 4 4 4 4 0 0 0 4-4 4 4 0 0 0-4-4m0 10a6 6 0 0 1-6-6 6 6 0 0 1 6-6 6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
<input class="md-option" data-md-color-media="(prefers-color-scheme: dark)" data-md-color-scheme="slate" data-md-color-primary="indigo" data-md-color-accent="indigo" aria-label="Switch to dark mode" type="radio" name="__palette" id="__palette_2">
<label class="md-header__button md-icon" title="Switch to dark mode" for="__palette_0" hidden>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 18c-.89 0-1.74-.2-2.5-.55C11.56 16.5 13 14.42 13 12s-1.44-4.5-3.5-5.45C10.26 6.2 11.11 6 12 6a6 6 0 0 1 6 6 6 6 0 0 1-6 6m8-9.31V4h-4.69L12 .69 8.69 4H4v4.69L.69 12 4 15.31V20h4.69L12 23.31 15.31 20H20v-4.69L23.31 12z"/></svg>
</label>
</form>
<script>var palette=__md_get("__palette");if(palette&&palette.color){if("(prefers-color-scheme)"===palette.color.media){var media=matchMedia("(prefers-color-scheme: light)"),input=document.querySelector(media.matches?"[data-md-color-media='(prefers-color-scheme: light)']":"[data-md-color-media='(prefers-color-scheme: dark)']");palette.color.media=input.getAttribute("data-md-color-media"),palette.color.scheme=input.getAttribute("data-md-color-scheme"),palette.color.primary=input.getAttribute("data-md-color-primary"),palette.color.accent=input.getAttribute("data-md-color-accent")}for(var[key,value]of Object.entries(palette.color))document.body.setAttribute("data-md-color-"+key,value)}</script>
<label class="md-header__button md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
</label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" name="search">
<input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" required>
<label class="md-search__icon md-icon" for="__search">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5"/></svg>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11z"/></svg>
</label>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" title="Clear" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
</button>
</nav>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" tabindex="0" data-md-scrollfix>
<div class="md-search-result" data-md-component="search-result">
<div class="md-search-result__meta">
Initializing search
</div>
<ol class="md-search-result__list" role="presentation"></ol>
</div>
</div>
</div>
</div>
</div>
</nav>
</header>
<div class="md-container" data-md-component="container">
<main class="md-main" data-md-component="main">
<div class="md-main__inner md-grid">
<div class="md-sidebar md-sidebar--primary" data-md-component="sidebar" data-md-type="navigation" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
<label class="md-nav__title" for="__drawer">
<a href=".." title="Jujutsu docs" class="md-nav__button md-logo" aria-label="Jujutsu docs" data-md-component="logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54"/></svg>
</a>
Jujutsu docs
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href=".." class="md-nav__link">
<span class="md-ellipsis">
Home
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_2" >
<label class="md-nav__link" for="__nav_2" id="__nav_2_label" tabindex="0">
<span class="md-ellipsis">
Getting started
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_2_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_2">
<span class="md-nav__icon md-icon"></span>
Getting started
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../install-and-setup/" class="md-nav__link">
<span class="md-ellipsis">
Installation and setup
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../tutorial/" class="md-nav__link">
<span class="md-ellipsis">
Tutorial and bird's eye view
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../github/" class="md-nav__link">
<span class="md-ellipsis">
Working with GitHub
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../windows/" class="md-nav__link">
<span class="md-ellipsis">
Working on Windows
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../FAQ/" class="md-nav__link">
<span class="md-ellipsis">
FAQ
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../cli-reference/" class="md-nav__link">
<span class="md-ellipsis">
CLI reference
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../testimonials/" class="md-nav__link">
<span class="md-ellipsis">
Testimonials
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../community_tools/" class="md-nav__link">
<span class="md-ellipsis">
Community-built tools
</span>
</a>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_7" >
<label class="md-nav__link" for="__nav_7" id="__nav_7_label" tabindex="0">
<span class="md-ellipsis">
Concepts
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_7_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_7">
<span class="md-nav__icon md-icon"></span>
Concepts
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../working-copy/" class="md-nav__link">
<span class="md-ellipsis">
Working copy
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../bookmarks/" class="md-nav__link">
<span class="md-ellipsis">
Bookmarks
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../conflicts/" class="md-nav__link">
<span class="md-ellipsis">
Conflicts
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../operation-log/" class="md-nav__link">
<span class="md-ellipsis">
Operation log
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../glossary/" class="md-nav__link">
<span class="md-ellipsis">
Glossary
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_8" checked>
<label class="md-nav__link" for="__nav_8" id="__nav_8_label" tabindex="0">
<span class="md-ellipsis">
Configuration
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_8_label" aria-expanded="true">
<label class="md-nav__title" for="__nav_8">
<span class="md-nav__icon md-icon"></span>
Configuration
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item md-nav__item--active">
<input class="md-nav__toggle md-toggle" type="checkbox" id="__toc">
<label class="md-nav__link md-nav__link--active" for="__toc">
<span class="md-ellipsis">
Settings
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
<span class="md-ellipsis">
Settings
</span>
</a>
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#config-files-and-toml" class="md-nav__link">
<span class="md-ellipsis">
Config files and TOML
</span>
</a>
<nav class="md-nav" aria-label="Config files and TOML">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#dotted-style-and-headings" class="md-nav__link">
<span class="md-ellipsis">
Dotted style and headings
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#user-settings" class="md-nav__link">
<span class="md-ellipsis">
User settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ui-settings" class="md-nav__link">
<span class="md-ellipsis">
UI settings
</span>
</a>
<nav class="md-nav" aria-label="UI settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#colorizing-output" class="md-nav__link">
<span class="md-ellipsis">
Colorizing output
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#custom-colors-and-styles" class="md-nav__link">
<span class="md-ellipsis">
Custom colors and styles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-command" class="md-nav__link">
<span class="md-ellipsis">
Default command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-description" class="md-nav__link">
<span class="md-ellipsis">
Default description
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#diff-colors-and-styles" class="md-nav__link">
<span class="md-ellipsis">
Diff colors and styles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#diff-format" class="md-nav__link">
<span class="md-ellipsis">
Diff format
</span>
</a>
<nav class="md-nav" aria-label="Diff format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#color-words-diff-options" class="md-nav__link">
<span class="md-ellipsis">
Color-words diff options
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-diff-options" class="md-nav__link">
<span class="md-ellipsis">
Git diff options
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#generating-diffs-by-external-command" class="md-nav__link">
<span class="md-ellipsis">
Generating diffs by external command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#conflict-marker-style" class="md-nav__link">
<span class="md-ellipsis">
Conflict marker style
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#set-of-immutable-commits" class="md-nav__link">
<span class="md-ellipsis">
Set of immutable commits
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#behavior-of-prev-and-next-commands" class="md-nav__link">
<span class="md-ellipsis">
Behavior of prev and next commands
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#list" class="md-nav__link">
<span class="md-ellipsis">
List
</span>
</a>
<nav class="md-nav" aria-label="List">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-template" class="md-nav__link">
<span class="md-ellipsis">
Default Template
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#log" class="md-nav__link">
<span class="md-ellipsis">
Log
</span>
</a>
<nav class="md-nav" aria-label="Log">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-revisions" class="md-nav__link">
<span class="md-ellipsis">
Default revisions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-template_1" class="md-nav__link">
<span class="md-ellipsis">
Default Template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#graph-style" class="md-nav__link">
<span class="md-ellipsis">
Graph style
</span>
</a>
<nav class="md-nav" aria-label="Graph style">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#node-style" class="md-nav__link">
<span class="md-ellipsis">
Node style
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#wrap-log-content" class="md-nav__link">
<span class="md-ellipsis">
Wrap log content
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#display-of-commit-and-change-ids" class="md-nav__link">
<span class="md-ellipsis">
Display of commit and change ids
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#relative-timestamps" class="md-nav__link">
<span class="md-ellipsis">
Relative timestamps
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#author-format" class="md-nav__link">
<span class="md-ellipsis">
Author format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#commit-timestamp" class="md-nav__link">
<span class="md-ellipsis">
Commit timestamp
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#signature-format" class="md-nav__link">
<span class="md-ellipsis">
Signature format
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#allow-large-revsets-by-default" class="md-nav__link">
<span class="md-ellipsis">
Allow "large" revsets by default
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pager" class="md-nav__link">
<span class="md-ellipsis">
Pager
</span>
</a>
<nav class="md-nav" aria-label="Pager">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#builtin-pager" class="md-nav__link">
<span class="md-ellipsis">
Builtin pager
</span>
</a>
<nav class="md-nav" aria-label="Builtin pager">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#key-bindings" class="md-nav__link">
<span class="md-ellipsis">
Key bindings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#wrapping-config" class="md-nav__link">
<span class="md-ellipsis">
Wrapping config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#auto-exit-clearing-the-screen-on-startup-or-exit" class="md-nav__link">
<span class="md-ellipsis">
Auto-exit, clearing the screen on startup or exit
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#processing-contents-to-be-paged" class="md-nav__link">
<span class="md-ellipsis">
Processing contents to be paged
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#aliases" class="md-nav__link">
<span class="md-ellipsis">
Aliases
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editor" class="md-nav__link">
<span class="md-ellipsis">
Editor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editing-diffs" class="md-nav__link">
<span class="md-ellipsis">
Editing diffs
</span>
</a>
<nav class="md-nav" aria-label="Editing diffs">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#experimental-3-pane-diff-editing" class="md-nav__link">
<span class="md-ellipsis">
Experimental 3-pane diff editing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#jj-instructions" class="md-nav__link">
<span class="md-ellipsis">
JJ-INSTRUCTIONS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-meld-as-a-diff-editor" class="md-nav__link">
<span class="md-ellipsis">
Using Meld as a diff editor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-vim-as-a-diff-editor" class="md-nav__link">
<span class="md-ellipsis">
Using Vim as a diff editor
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#3-way-merge-tools-for-conflict-resolution" class="md-nav__link">
<span class="md-ellipsis">
3-way merge tools for conflict resolution
</span>
</a>
<nav class="md-nav" aria-label="3-way merge tools for conflict resolution">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#setting-up-a-custom-merge-tool" class="md-nav__link">
<span class="md-ellipsis">
Setting up a custom merge tool
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editing-conflict-markers-with-a-tool-or-a-text-editor" class="md-nav__link">
<span class="md-ellipsis">
Editing conflict markers with a tool or a text editor
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#code-formatting-and-other-file-content-transformations" class="md-nav__link">
<span class="md-ellipsis">
Code formatting and other file content transformations
</span>
</a>
<nav class="md-nav" aria-label="Code formatting and other file content transformations">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#enforce-coding-style-rules" class="md-nav__link">
<span class="md-ellipsis">
Enforce coding style rules
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sort-and-remove-duplicate-lines-from-a-file" class="md-nav__link">
<span class="md-ellipsis">
Sort and remove duplicate lines from a file
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#execution-order-of-tools" class="md-nav__link">
<span class="md-ellipsis">
Execution order of tools
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#disabling-and-enabling-tools" class="md-nav__link">
<span class="md-ellipsis">
Disabling and enabling tools
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#commit-signing" class="md-nav__link">
<span class="md-ellipsis">
Commit Signing
</span>
</a>
<nav class="md-nav" aria-label="Commit Signing">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#gnupg-signing" class="md-nav__link">
<span class="md-ellipsis">
GnuPG Signing
</span>
</a>
<nav class="md-nav" aria-label="GnuPG Signing">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pkcs12-certificates" class="md-nav__link">
<span class="md-ellipsis">
PKCS#12 Certificates
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#ssh-signing" class="md-nav__link">
<span class="md-ellipsis">
SSH Signing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sign-commits-only-on-jj-git-push" class="md-nav__link">
<span class="md-ellipsis">
Sign commits only on jj git push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#manually-signing-commits" class="md-nav__link">
<span class="md-ellipsis">
Manually signing commits
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#commit-signature-verification" class="md-nav__link">
<span class="md-ellipsis">
Commit Signature Verification
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-settings" class="md-nav__link">
<span class="md-ellipsis">
Git settings
</span>
</a>
<nav class="md-nav" aria-label="Git settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-remotes-for-jj-git-fetch-and-jj-git-push" class="md-nav__link">
<span class="md-ellipsis">
Default remotes for jj git fetch and jj git push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#automatic-local-bookmark-creation" class="md-nav__link">
<span class="md-ellipsis">
Automatic local bookmark creation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#abandon-commits-that-became-unreachable-in-git" class="md-nav__link">
<span class="md-ellipsis">
Abandon commits that became unreachable in Git
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#prefix-for-generated-bookmarks-on-push" class="md-nav__link">
<span class="md-ellipsis">
Prefix for generated bookmarks on push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#set-of-private-commits" class="md-nav__link">
<span class="md-ellipsis">
Set of private commits
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-subprocessing-behaviour" class="md-nav__link">
<span class="md-ellipsis">
Git subprocessing behaviour
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#filesystem-monitor" class="md-nav__link">
<span class="md-ellipsis">
Filesystem monitor
</span>
</a>
<nav class="md-nav" aria-label="Filesystem monitor">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#watchman" class="md-nav__link">
<span class="md-ellipsis">
Watchman
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#snapshot-settings" class="md-nav__link">
<span class="md-ellipsis">
Snapshot settings
</span>
</a>
<nav class="md-nav" aria-label="Snapshot settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#paths-to-automatically-track" class="md-nav__link">
<span class="md-ellipsis">
Paths to automatically track
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#maximum-size-for-new-files" class="md-nav__link">
<span class="md-ellipsis">
Maximum size for new files
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#ways-to-specify-jj-config-details" class="md-nav__link">
<span class="md-ellipsis">
Ways to specify jj config: details
</span>
</a>
<nav class="md-nav" aria-label="Ways to specify jj config: details">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#user-config-files" class="md-nav__link">
<span class="md-ellipsis">
User config files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#json-schema-support" class="md-nav__link">
<span class="md-ellipsis">
JSON Schema Support
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#specifying-config-on-the-command-line" class="md-nav__link">
<span class="md-ellipsis">
Specifying config on the command-line
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#conditional-variables" class="md-nav__link">
<span class="md-ellipsis">
Conditional variables
</span>
</a>
<nav class="md-nav" aria-label="Conditional variables">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#using-scope-tables" class="md-nav__link">
<span class="md-ellipsis">
Using [[--scope]] tables
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-multiple-files" class="md-nav__link">
<span class="md-ellipsis">
Using multiple files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#available-condition-keys" class="md-nav__link">
<span class="md-ellipsis">
Available condition keys
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../filesets/" class="md-nav__link">
<span class="md-ellipsis">
Fileset language
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../revsets/" class="md-nav__link">
<span class="md-ellipsis">
Revset language
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../templates/" class="md-nav__link">
<span class="md-ellipsis">
Templating language
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_9" >
<label class="md-nav__link" for="__nav_9" id="__nav_9_label" tabindex="0">
<span class="md-ellipsis">
Comparisons
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_9_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_9">
<span class="md-nav__icon md-icon"></span>
Comparisons
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../git-comparison/" class="md-nav__link">
<span class="md-ellipsis">
Git comparison
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../git-command-table/" class="md-nav__link">
<span class="md-ellipsis">
Git command table
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../git-compatibility/" class="md-nav__link">
<span class="md-ellipsis">
Git compatibility
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../sapling-comparison/" class="md-nav__link">
<span class="md-ellipsis">
Sapling comparison
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../related-work/" class="md-nav__link">
<span class="md-ellipsis">
Other related work
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_10" >
<label class="md-nav__link" for="__nav_10" id="__nav_10_label" tabindex="0">
<span class="md-ellipsis">
Technical details
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_10_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_10">
<span class="md-nav__icon md-icon"></span>
Technical details
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../technical/architecture/" class="md-nav__link">
<span class="md-ellipsis">
Architecture
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../technical/concurrency/" class="md-nav__link">
<span class="md-ellipsis">
Concurrency
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../technical/conflicts/" class="md-nav__link">
<span class="md-ellipsis">
Conflicts
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_11" >
<label class="md-nav__link" for="__nav_11" id="__nav_11_label" tabindex="0">
<span class="md-ellipsis">
Contributing
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_11_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_11">
<span class="md-nav__icon md-icon"></span>
Contributing
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../contributing/" class="md-nav__link">
<span class="md-ellipsis">
Guidelines and "How to...?"
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../code-of-conduct/" class="md-nav__link">
<span class="md-ellipsis">
Code of conduct
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design_docs/" class="md-nav__link">
<span class="md-ellipsis">
Design docs
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design_doc_blueprint/" class="md-nav__link">
<span class="md-ellipsis">
Design doc blueprint
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../releasing/" class="md-nav__link">
<span class="md-ellipsis">
Releasing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../governance/temporary-voting/" class="md-nav__link">
<span class="md-ellipsis">
Temporary voting for governance
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../governance/GOVERNANCE/" class="md-nav__link">
<span class="md-ellipsis">
Governance
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item md-nav__item--nested">
<input class="md-nav__toggle md-toggle " type="checkbox" id="__nav_12" >
<label class="md-nav__link" for="__nav_12" id="__nav_12_label" tabindex="0">
<span class="md-ellipsis">
Design docs
</span>
<span class="md-nav__icon md-icon"></span>
</label>
<nav class="md-nav" data-md-level="1" aria-labelledby="__nav_12_label" aria-expanded="false">
<label class="md-nav__title" for="__nav_12">
<span class="md-nav__icon md-icon"></span>
Design docs
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../design/git-submodules/" class="md-nav__link">
<span class="md-ellipsis">
git-submodules
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design/git-submodule-storage/" class="md-nav__link">
<span class="md-ellipsis">
git-submodule-storage
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design/run/" class="md-nav__link">
<span class="md-ellipsis">
JJ run
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design/sparse-v2/" class="md-nav__link">
<span class="md-ellipsis">
Sparse patterns v2
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design/tracking-branches/" class="md-nav__link">
<span class="md-ellipsis">
Tracking branches
</span>
</a>
</li>
<li class="md-nav__item">
<a href="../design/copy-tracking/" class="md-nav__link">
<span class="md-ellipsis">
Copy tracking and tracing
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="../roadmap/" class="md-nav__link">
<span class="md-ellipsis">
Development roadmap
</span>
</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
<label class="md-nav__title" for="__toc">
<span class="md-nav__icon md-icon"></span>
Table of contents
</label>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#config-files-and-toml" class="md-nav__link">
<span class="md-ellipsis">
Config files and TOML
</span>
</a>
<nav class="md-nav" aria-label="Config files and TOML">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#dotted-style-and-headings" class="md-nav__link">
<span class="md-ellipsis">
Dotted style and headings
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#user-settings" class="md-nav__link">
<span class="md-ellipsis">
User settings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#ui-settings" class="md-nav__link">
<span class="md-ellipsis">
UI settings
</span>
</a>
<nav class="md-nav" aria-label="UI settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#colorizing-output" class="md-nav__link">
<span class="md-ellipsis">
Colorizing output
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#custom-colors-and-styles" class="md-nav__link">
<span class="md-ellipsis">
Custom colors and styles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-command" class="md-nav__link">
<span class="md-ellipsis">
Default command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-description" class="md-nav__link">
<span class="md-ellipsis">
Default description
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#diff-colors-and-styles" class="md-nav__link">
<span class="md-ellipsis">
Diff colors and styles
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#diff-format" class="md-nav__link">
<span class="md-ellipsis">
Diff format
</span>
</a>
<nav class="md-nav" aria-label="Diff format">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#color-words-diff-options" class="md-nav__link">
<span class="md-ellipsis">
Color-words diff options
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-diff-options" class="md-nav__link">
<span class="md-ellipsis">
Git diff options
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#generating-diffs-by-external-command" class="md-nav__link">
<span class="md-ellipsis">
Generating diffs by external command
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#conflict-marker-style" class="md-nav__link">
<span class="md-ellipsis">
Conflict marker style
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#set-of-immutable-commits" class="md-nav__link">
<span class="md-ellipsis">
Set of immutable commits
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#behavior-of-prev-and-next-commands" class="md-nav__link">
<span class="md-ellipsis">
Behavior of prev and next commands
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#list" class="md-nav__link">
<span class="md-ellipsis">
List
</span>
</a>
<nav class="md-nav" aria-label="List">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-template" class="md-nav__link">
<span class="md-ellipsis">
Default Template
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#log" class="md-nav__link">
<span class="md-ellipsis">
Log
</span>
</a>
<nav class="md-nav" aria-label="Log">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-revisions" class="md-nav__link">
<span class="md-ellipsis">
Default revisions
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#default-template_1" class="md-nav__link">
<span class="md-ellipsis">
Default Template
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#graph-style" class="md-nav__link">
<span class="md-ellipsis">
Graph style
</span>
</a>
<nav class="md-nav" aria-label="Graph style">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#node-style" class="md-nav__link">
<span class="md-ellipsis">
Node style
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#wrap-log-content" class="md-nav__link">
<span class="md-ellipsis">
Wrap log content
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#display-of-commit-and-change-ids" class="md-nav__link">
<span class="md-ellipsis">
Display of commit and change ids
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#relative-timestamps" class="md-nav__link">
<span class="md-ellipsis">
Relative timestamps
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#author-format" class="md-nav__link">
<span class="md-ellipsis">
Author format
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#commit-timestamp" class="md-nav__link">
<span class="md-ellipsis">
Commit timestamp
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#signature-format" class="md-nav__link">
<span class="md-ellipsis">
Signature format
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#allow-large-revsets-by-default" class="md-nav__link">
<span class="md-ellipsis">
Allow "large" revsets by default
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#pager" class="md-nav__link">
<span class="md-ellipsis">
Pager
</span>
</a>
<nav class="md-nav" aria-label="Pager">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#builtin-pager" class="md-nav__link">
<span class="md-ellipsis">
Builtin pager
</span>
</a>
<nav class="md-nav" aria-label="Builtin pager">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#key-bindings" class="md-nav__link">
<span class="md-ellipsis">
Key bindings
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#wrapping-config" class="md-nav__link">
<span class="md-ellipsis">
Wrapping config
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#auto-exit-clearing-the-screen-on-startup-or-exit" class="md-nav__link">
<span class="md-ellipsis">
Auto-exit, clearing the screen on startup or exit
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#processing-contents-to-be-paged" class="md-nav__link">
<span class="md-ellipsis">
Processing contents to be paged
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#aliases" class="md-nav__link">
<span class="md-ellipsis">
Aliases
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editor" class="md-nav__link">
<span class="md-ellipsis">
Editor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editing-diffs" class="md-nav__link">
<span class="md-ellipsis">
Editing diffs
</span>
</a>
<nav class="md-nav" aria-label="Editing diffs">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#experimental-3-pane-diff-editing" class="md-nav__link">
<span class="md-ellipsis">
Experimental 3-pane diff editing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#jj-instructions" class="md-nav__link">
<span class="md-ellipsis">
JJ-INSTRUCTIONS
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-meld-as-a-diff-editor" class="md-nav__link">
<span class="md-ellipsis">
Using Meld as a diff editor
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-vim-as-a-diff-editor" class="md-nav__link">
<span class="md-ellipsis">
Using Vim as a diff editor
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#3-way-merge-tools-for-conflict-resolution" class="md-nav__link">
<span class="md-ellipsis">
3-way merge tools for conflict resolution
</span>
</a>
<nav class="md-nav" aria-label="3-way merge tools for conflict resolution">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#setting-up-a-custom-merge-tool" class="md-nav__link">
<span class="md-ellipsis">
Setting up a custom merge tool
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#editing-conflict-markers-with-a-tool-or-a-text-editor" class="md-nav__link">
<span class="md-ellipsis">
Editing conflict markers with a tool or a text editor
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#code-formatting-and-other-file-content-transformations" class="md-nav__link">
<span class="md-ellipsis">
Code formatting and other file content transformations
</span>
</a>
<nav class="md-nav" aria-label="Code formatting and other file content transformations">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#enforce-coding-style-rules" class="md-nav__link">
<span class="md-ellipsis">
Enforce coding style rules
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sort-and-remove-duplicate-lines-from-a-file" class="md-nav__link">
<span class="md-ellipsis">
Sort and remove duplicate lines from a file
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#execution-order-of-tools" class="md-nav__link">
<span class="md-ellipsis">
Execution order of tools
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#disabling-and-enabling-tools" class="md-nav__link">
<span class="md-ellipsis">
Disabling and enabling tools
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#commit-signing" class="md-nav__link">
<span class="md-ellipsis">
Commit Signing
</span>
</a>
<nav class="md-nav" aria-label="Commit Signing">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#gnupg-signing" class="md-nav__link">
<span class="md-ellipsis">
GnuPG Signing
</span>
</a>
<nav class="md-nav" aria-label="GnuPG Signing">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#pkcs12-certificates" class="md-nav__link">
<span class="md-ellipsis">
PKCS#12 Certificates
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#ssh-signing" class="md-nav__link">
<span class="md-ellipsis">
SSH Signing
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#sign-commits-only-on-jj-git-push" class="md-nav__link">
<span class="md-ellipsis">
Sign commits only on jj git push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#manually-signing-commits" class="md-nav__link">
<span class="md-ellipsis">
Manually signing commits
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#commit-signature-verification" class="md-nav__link">
<span class="md-ellipsis">
Commit Signature Verification
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-settings" class="md-nav__link">
<span class="md-ellipsis">
Git settings
</span>
</a>
<nav class="md-nav" aria-label="Git settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#default-remotes-for-jj-git-fetch-and-jj-git-push" class="md-nav__link">
<span class="md-ellipsis">
Default remotes for jj git fetch and jj git push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#automatic-local-bookmark-creation" class="md-nav__link">
<span class="md-ellipsis">
Automatic local bookmark creation
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#abandon-commits-that-became-unreachable-in-git" class="md-nav__link">
<span class="md-ellipsis">
Abandon commits that became unreachable in Git
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#prefix-for-generated-bookmarks-on-push" class="md-nav__link">
<span class="md-ellipsis">
Prefix for generated bookmarks on push
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#set-of-private-commits" class="md-nav__link">
<span class="md-ellipsis">
Set of private commits
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#git-subprocessing-behaviour" class="md-nav__link">
<span class="md-ellipsis">
Git subprocessing behaviour
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#filesystem-monitor" class="md-nav__link">
<span class="md-ellipsis">
Filesystem monitor
</span>
</a>
<nav class="md-nav" aria-label="Filesystem monitor">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#watchman" class="md-nav__link">
<span class="md-ellipsis">
Watchman
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#snapshot-settings" class="md-nav__link">
<span class="md-ellipsis">
Snapshot settings
</span>
</a>
<nav class="md-nav" aria-label="Snapshot settings">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#paths-to-automatically-track" class="md-nav__link">
<span class="md-ellipsis">
Paths to automatically track
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#maximum-size-for-new-files" class="md-nav__link">
<span class="md-ellipsis">
Maximum size for new files
</span>
</a>
</li>
</ul>
</nav>
</li>
<li class="md-nav__item">
<a href="#ways-to-specify-jj-config-details" class="md-nav__link">
<span class="md-ellipsis">
Ways to specify jj config: details
</span>
</a>
<nav class="md-nav" aria-label="Ways to specify jj config: details">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#user-config-files" class="md-nav__link">
<span class="md-ellipsis">
User config files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#json-schema-support" class="md-nav__link">
<span class="md-ellipsis">
JSON Schema Support
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#specifying-config-on-the-command-line" class="md-nav__link">
<span class="md-ellipsis">
Specifying config on the command-line
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#conditional-variables" class="md-nav__link">
<span class="md-ellipsis">
Conditional variables
</span>
</a>
<nav class="md-nav" aria-label="Conditional variables">
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="#using-scope-tables" class="md-nav__link">
<span class="md-ellipsis">
Using [[--scope]] tables
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#using-multiple-files" class="md-nav__link">
<span class="md-ellipsis">
Using multiple files
</span>
</a>
</li>
<li class="md-nav__item">
<a href="#available-condition-keys" class="md-nav__link">
<span class="md-ellipsis">
Available condition keys
</span>
</a>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="configuration">Configuration<a class="headerlink" href="#configuration" title="Permanent link">&para;</a></h1>
<p>These are the config settings available to jj/Jujutsu.</p>
<h2 id="config-files-and-toml">Config files and TOML<a class="headerlink" href="#config-files-and-toml" title="Permanent link">&para;</a></h2>
<p><code>jj</code> loads several types of config settings:</p>
<ul>
<li>
<p>The built-in settings. These cannot be edited. They can be viewed in the
<code>cli/src/config/</code> directory in <code>jj</code>'s source repo.</p>
</li>
<li>
<p>The user settings. These can be edited with <code>jj config edit --user</code>. User
settings are located in <a href="#user-config-files">the user config files</a>, which can be found with <code>jj
config path --user</code>.</p>
</li>
<li>
<p>The repo settings. These can be edited with <code>jj config edit --repo</code> and are
located in <code>.jj/repo/config.toml</code>.</p>
</li>
<li>
<p>Settings <a href="#specifying-config-on-the-command-line">specified in the command-line</a>.</p>
</li>
</ul>
<p>These are listed in the order they are loaded; the settings from earlier items
in the list are overridden by the settings from later items if they disagree.
Every type of config except for the built-in settings is optional.</p>
<p>You can enable JSON Schema validation in your editor by adding a <code>$schema</code>
reference at the top of your TOML config files. See <a href="#json-schema-support">JSON Schema
Support</a> for details.</p>
<p>See the <a href="https://toml.io/en/">TOML site</a> and the <a href="https://toml.io/en/v1.0.0">syntax guide</a> for a detailed description of the
syntax. We cover some of the basics below.</p>
<p>The first thing to remember is that the value of a setting (the part to the
right of the <code>=</code> sign) should be surrounded in quotes if it's a string.</p>
<h3 id="dotted-style-and-headings">Dotted style and headings<a class="headerlink" href="#dotted-style-and-headings" title="Permanent link">&para;</a></h3>
<p>In TOML, anything under a heading can be dotted instead. For example,
<code>user.name = "YOUR NAME"</code> is equivalent to:</p>
<div class="highlight"><pre><span></span><code><span class="k">[user]</span>
<span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR NAME&quot;</span>
</code></pre></div>
<p>For future reference, here are a couple of more complicated examples,</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Dotted style</span>
<span class="n">template-aliases</span><span class="p">.</span><span class="s2">&quot;format_short_id(id)&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;id.shortest(12)&quot;</span>
<span class="n">colors</span><span class="p">.</span><span class="s2">&quot;commit_id prefix&quot;</span><span class="p">.</span><span class="n">bold</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
<span class="c1"># is equivalent to:</span>
<span class="k">[template-aliases]</span>
<span class="s2">&quot;format_short_id(id)&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;id.shortest(12)&quot;</span>
<span class="k">[colors]</span>
<span class="s2">&quot;commit_id prefix&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">bold</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
<p>The docs below refer to keys in text using dotted notation, but example
blocks will use heading notation to be unambiguous. If you are confident with TOML
then use whichever suits you in your config. If you mix dotted keys and headings,
<strong>you must put the dotted keys before the first heading</strong>.</p>
<p>That's probably enough TOML to keep you out of trouble but the <a href="https://toml.io/en/v1.0.0">syntax guide</a> is
very short if you ever need to check.</p>
<h2 id="user-settings">User settings<a class="headerlink" href="#user-settings" title="Permanent link">&para;</a></h2>
<div class="highlight"><pre><span></span><code><span class="k">[user]</span>
<span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR NAME&quot;</span>
<span class="n">email</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR_EMAIL@example.com&quot;</span>
</code></pre></div>
<p>Don't forget to change these to your own details!</p>
<h2 id="ui-settings">UI settings<a class="headerlink" href="#ui-settings" title="Permanent link">&para;</a></h2>
<h3 id="colorizing-output">Colorizing output<a class="headerlink" href="#colorizing-output" title="Permanent link">&para;</a></h3>
<p>Possible values are <code>always</code>, <code>never</code>, <code>debug</code> and <code>auto</code> (default: <code>auto</code>).
<code>auto</code> will use color only when writing to a terminal. <code>debug</code> will print the
active labels alongside the regular colorized output.</p>
<p>This setting overrides the <code>NO_COLOR</code> environment variable (if set).</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">color</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;never&quot;</span><span class="w"> </span><span class="c1"># Turn off color</span>
</code></pre></div>
<h3 id="custom-colors-and-styles">Custom colors and styles<a class="headerlink" href="#custom-colors-and-styles" title="Permanent link">&para;</a></h3>
<p>You can customize the colors used for various elements of the UI. For example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[colors]</span>
<span class="n">commit_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;green&quot;</span>
</code></pre></div>
<p>The following colors are available:</p>
<ul>
<li>black</li>
<li>red</li>
<li>green</li>
<li>yellow</li>
<li>blue</li>
<li>magenta</li>
<li>cyan</li>
<li>white</li>
<li>default</li>
</ul>
<p>All of them but "default" come in a bright version too, e.g. "bright red". The
"default" color can be used to override a color defined by a parent style
(explained below).</p>
<p>You can also use a 6-digit hex code for more control over the exact color used:</p>
<div class="highlight"><pre><span></span><code><span class="k">[colors]</span>
<span class="n">change_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;#ff1525&quot;</span>
</code></pre></div>
<p>If you use a string value for a color, as in the examples above, it will be used
for the foreground color. You can also set the background color, reverse colors
(swap foreground and background), or make the text bold, italic, or underlined.
For that, you need to use a table:</p>
<div class="highlight"><pre><span></span><code><span class="k">[colors]</span>
<span class="n">commit_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">fg</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s2">&quot;green&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">bg</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s2">&quot;#ff1525&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">bold</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span>
<span class="n">change_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">reverse</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="n">italic</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
<p>The key names are called "labels". The above used <code>commit_id</code> as label. You can
also create rules combining multiple labels. The rules work a bit like CSS
selectors. For example, if you want to color commit IDs green in general but
make the commit ID of the working-copy commit also be underlined, you can do
this:</p>
<div class="highlight"><pre><span></span><code><span class="k">[colors]</span>
<span class="n">commit_id</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;green&quot;</span>
<span class="s2">&quot;working_copy commit_id&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
<p>Parts of the style that are not overridden - such as the foreground color in the
example above - are inherited from the style of the parent label.</p>
<p>Which elements can be colored is not yet documented, but see
the <a href="https://github.com/jj-vcs/jj/blob/main/cli/src/config/colors.toml">default color configuration</a>
for some examples of what's possible.</p>
<h3 id="default-command">Default command<a class="headerlink" href="#default-command" title="Permanent link">&para;</a></h3>
<p>When <code>jj</code> is run with no explicit subcommand, the value of the
<code>ui.default-command</code> setting will be used instead. Possible values are any valid
subcommand name, subcommand alias, or user-defined alias (defaults to <code>"log"</code>).</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">default-command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;log&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--reversed&quot;</span><span class="p">]</span>
</code></pre></div>
<h3 id="default-description">Default description<a class="headerlink" href="#default-description" title="Permanent link">&para;</a></h3>
<p>The editor content of a commit description can be populated by the
<code>draft_commit_description</code> template.</p>
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="n">draft_commit_description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;&#39;&#39;</span>
<span class="s1">concat(</span>
<span class="s1"> coalesce(description, &quot;\n&quot;),</span>
<span class="s1"> surround(</span>
<span class="s1"> &quot;\nJJ: This commit contains the following changes:\n&quot;, &quot;&quot;,</span>
<span class="s1"> indent(&quot;JJ: &quot;, diff.stat(72)),</span>
<span class="s1"> ),</span>
<span class="s1"> &quot;\nJJ: ignore-rest\n&quot;,</span>
<span class="s1"> diff.git(),</span>
<span class="s1">)</span>
<span class="s1">&#39;&#39;&#39;</span>
</code></pre></div>
<p>The value of the <code>ui.default-description</code> setting can also be used in order to
fill in things like BUG=, TESTED= etc.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">default-description</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;</span><span class="se">\n\n</span><span class="s2">TESTED=TODO&quot;</span>
</code></pre></div>
<h3 id="diff-colors-and-styles">Diff colors and styles<a class="headerlink" href="#diff-colors-and-styles" title="Permanent link">&para;</a></h3>
<p>In color-words and git diffs, word-level hunks are rendered with underline. You
can override the default style with the following keys:</p>
<div class="highlight"><pre><span></span><code><span class="k">[colors]</span>
<span class="c1"># Highlight hunks with background</span>
<span class="s2">&quot;diff removed token&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">bg</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s2">&quot;#221111&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="p">}</span>
<span class="s2">&quot;diff added token&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">bg</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="s2">&quot;#002200&quot;</span><span class="p">,</span><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="p">}</span>
<span class="c1"># Alternatively, swap colors</span>
<span class="s2">&quot;diff token&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">reverse</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">true</span><span class="p">,</span><span class="w"> </span><span class="n">underline</span><span class="w"> </span><span class="p">=</span><span class="w"> </span><span class="kc">false</span><span class="w"> </span><span class="p">}</span>
</code></pre></div>
<h3 id="diff-format">Diff format<a class="headerlink" href="#diff-format" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Possible values: &quot;color-words&quot; (default), &quot;git&quot;, &quot;summary&quot;</span>
<span class="n">diff</span><span class="p">.</span><span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;git&quot;</span>
</code></pre></div>
<h4 id="color-words-diff-options">Color-words diff options<a class="headerlink" href="#color-words-diff-options" title="Permanent link">&para;</a></h4>
<p>In color-words diffs, changed words are displayed inline by default. Because
it's difficult to read a diff line with many removed/added words, there's a
threshold to switch to traditional separate-line format. You can also change
the default number of lines of context shown.</p>
<ul>
<li>
<p><code>max-inline-alternation</code>: Maximum number of removed/added word alternation to
inline. For example, <code>&lt;added&gt; ... &lt;added&gt;</code> sequence has 1 alternation, so the
line will be inline if <code>max-inline-alternation &gt;= 1</code>. <code>&lt;added&gt; ... &lt;removed&gt;
... &lt;added&gt;</code> sequence has 3 alternation.</p>
<ul>
<li><code>0</code>: disable inlining, making <code>--color-words</code> more similar to <code>--git</code></li>
<li><code>1</code>: inline removes-only or adds-only lines</li>
<li><code>2</code>, <code>3</code>, ..: inline up to <code>2</code>, <code>3</code>, .. alternation</li>
<li><code>-1</code>: inline all lines</li>
</ul>
<p>The default is <code>3</code>.</p>
<p><strong>This parameter is experimental.</strong> The definition is subject to change.</p>
</li>
<li>
<p><code>context</code>: Number of lines of context to show in the diff. The default is <code>3</code>.</p>
</li>
</ul>
<div class="highlight"><pre><span></span><code><span class="k">[diff.color-words]</span>
<span class="n">max-inline-alternation</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span>
<span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span>
</code></pre></div>
<h4 id="git-diff-options">Git diff options<a class="headerlink" href="#git-diff-options" title="Permanent link">&para;</a></h4>
<p>In git diffs you can change the default number of lines of context shown.</p>
<ul>
<li><code>context</code>: Number of lines of context to show in the diff. The default is <code>3</code>.</li>
</ul>
<div class="highlight"><pre><span></span><code><span class="k">[diff.git]</span>
<span class="n">context</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">3</span>
</code></pre></div>
<h3 id="generating-diffs-by-external-command">Generating diffs by external command<a class="headerlink" href="#generating-diffs-by-external-command" title="Permanent link">&para;</a></h3>
<p>If <code>ui.diff.tool</code> is set, the specified diff command will be called instead of
the internal diff function.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Use Difftastic by default</span>
<span class="n">diff</span><span class="p">.</span><span class="n">tool</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;difft&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--color=always&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">]</span>
<span class="c1"># Use tool named &quot;&lt;name&gt;&quot; (see below)</span>
<span class="n">diff</span><span class="p">.</span><span class="n">tool</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;&lt;name&gt;&quot;</span>
</code></pre></div>
<p>The external diff tool can also be enabled by <code>diff --tool &lt;name&gt;</code> argument.
For the tool named <code>&lt;name&gt;</code>, command arguments can be configured as follows.</p>
<div class="highlight"><pre><span></span><code><span class="k">[merge-tools.</span><span class="err">&lt;</span><span class="k">name</span><span class="err">&gt;</span><span class="k">]</span>
<span class="c1"># program = &quot;&lt;name&gt;&quot; # Defaults to the name of the tool if not specified</span>
<span class="n">diff-args</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;--color=always&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">]</span>
</code></pre></div>
<ul>
<li><code>$left</code> and <code>$right</code> are replaced with the paths to the left and right
directories to diff respectively.</li>
</ul>
<p>By default <code>jj</code> will invoke external tools with a directory containing the left
and right sides. The <code>diff-invocation-mode</code> config can change this to file by file
invocations as follows:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">diff</span><span class="p">.</span><span class="n">tool</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;vimdiff&quot;</span>
<span class="k">[merge-tools.vimdiff]</span>
<span class="n">diff-invocation-mode</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;file-by-file&quot;</span>
</code></pre></div>
<p>By default <code>jj</code> will display a warning when the command exits with a non-success
error code. The <code>diff-expected-exit-codes</code> config can suppress this warning
message for specific exit codes:</p>
<div class="highlight"><pre><span></span><code><span class="k">[merge-tools.delta]</span>
<span class="n">diff-expected-exit-codes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="mi">0</span><span class="p">,</span><span class="w"> </span><span class="mi">1</span><span class="p">]</span>
</code></pre></div>
<h3 id="conflict-marker-style">Conflict marker style<a class="headerlink" href="#conflict-marker-style" title="Permanent link">&para;</a></h3>
<p>You can configure which style of conflict markers to use when materializing
conflicts:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Shows a single snapshot and one or more diffs to apply to it</span>
<span class="n">conflict-marker-style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;diff&quot;</span>
<span class="c1"># Shows a snapshot for each side and base of the conflict</span>
<span class="n">conflict-marker-style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;snapshot&quot;</span>
<span class="c1"># Uses Git&#39;s &quot;diff3&quot; conflict markers to support tools that depend on it</span>
<span class="n">conflict-marker-style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;git&quot;</span>
</code></pre></div>
<p>For more details about these conflict marker styles, see the <a href="../conflicts/#conflict-markers">conflicts
page</a>.</p>
<h3 id="set-of-immutable-commits">Set of immutable commits<a class="headerlink" href="#set-of-immutable-commits" title="Permanent link">&para;</a></h3>
<p>You can configure the set of immutable commits via
<code>revset-aliases."immutable_heads()"</code>. The default set of immutable heads is
<code>builtin_immutable_heads()</code>, which in turn is defined as
<code>present(trunk()) | tags() | untracked_remote_bookmarks()</code>. For example, to
also consider the <code>release@origin</code> bookmark immutable:</p>
<div class="highlight"><pre><span></span><code><span class="k">[revset-aliases]</span>
<span class="s2">&quot;immutable_heads()&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_immutable_heads() | release@origin&quot;</span>
</code></pre></div>
<p>To prevent rewriting commits authored by other users:</p>
<div class="highlight"><pre><span></span><code><span class="c1"># The `trunk().. &amp;` bit is an optimization to scan for non-`mine()` commits</span>
<span class="c1"># only among commits that are not in `trunk()`.</span>
<span class="k">[revset-aliases]</span>
<span class="s2">&quot;immutable_heads()&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_immutable_heads() | (trunk().. &amp; ~mine())&quot;</span>
</code></pre></div>
<p>Ancestors of the configured set are also immutable. The root commit is always
immutable even if the set is empty.</p>
<p>Immutable commits (other than the root commit) can be rewritten using the
<code>--ignore-immutable</code> CLI flag.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Using <code>--ignore-immutable</code> will allow you to rewrite any commit in the
history, and all descendants, without warning. Use this power wisely, and
remember <code>jj undo</code>.</p>
</div>
<h3 id="behavior-of-prev-and-next-commands">Behavior of prev and next commands<a class="headerlink" href="#behavior-of-prev-and-next-commands" title="Permanent link">&para;</a></h3>
<p>If you prefer using an "edit-based" workflow, rather than squashing
modifications into parent changes, you may find yourself using the <code>prev</code> and
<code>next</code> commands with their <code>--edit</code> flag often to move between your changes. You
can avoid having to type the <code>--edit</code> flag every time you need it by actually
making it the default:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui.movement]</span>
<span class="n">edit</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<p>You can pass the <code>--no-edit</code> flag to <code>prev</code> and <code>next</code> if you find yourself
needing the original behavior.</p>
<h2 id="list">List<a class="headerlink" href="#list" title="Permanent link">&para;</a></h2>
<h3 id="default-template">Default Template<a class="headerlink" href="#default-template" title="Permanent link">&para;</a></h3>
<p>You can configure the template used when no <code>-T</code> is specified.</p>
<ul>
<li><code>templates.config_list</code> for <code>jj config list</code></li>
</ul>
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="c1"># Use builtin config list template</span>
<span class="n">config_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_config_list&quot;</span>
</code></pre></div>
<p>If you want to see the config variable origin (type and path) when you do <code>jj config list</code>
you can add this to your config:</p>
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="n">config_list</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_config_list_detailed&quot;</span>
</code></pre></div>
<h2 id="log">Log<a class="headerlink" href="#log" title="Permanent link">&para;</a></h2>
<h3 id="default-revisions">Default revisions<a class="headerlink" href="#default-revisions" title="Permanent link">&para;</a></h3>
<p>You can configure the revisions <code>jj log</code> would show when neither <code>-r</code> nor any paths are specified.</p>
<div class="highlight"><pre><span></span><code><span class="k">[revsets]</span>
<span class="c1"># Show commits that are not in `main@origin`</span>
<span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;main@origin..&quot;</span>
</code></pre></div>
<p>The default value for <code>revsets.log</code> is
<code>'present(@) | ancestors(immutable_heads().., 2) | present(trunk())'</code>.</p>
<h3 id="default-template_1">Default Template<a class="headerlink" href="#default-template_1" title="Permanent link">&para;</a></h3>
<p>You can configure the template used when no <code>-T</code> is specified.</p>
<ul>
<li><code>templates.log</code> for <code>jj log</code></li>
<li><code>templates.op_log</code> for <code>jj op log</code></li>
<li><code>templates.show</code> for <code>jj show</code></li>
</ul>
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="c1"># Use builtin log template</span>
<span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_log_compact&quot;</span>
<span class="c1"># Use builtin op log template</span>
<span class="n">op_log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_op_log_compact&quot;</span>
<span class="c1"># Use builtin show template</span>
<span class="n">show</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_log_detailed&quot;</span>
</code></pre></div>
<p>If you want to see the full description when you do <code>jj log</code> you can add this to
your config:</p>
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="n">log</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;builtin_log_compact_full_description&quot;</span>
</code></pre></div>
<h3 id="graph-style">Graph style<a class="headerlink" href="#graph-style" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Possible values: &quot;curved&quot; (default), &quot;square&quot;, &quot;ascii&quot;, &quot;ascii-large&quot;</span>
<span class="n">graph</span><span class="p">.</span><span class="n">style</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;square&quot;</span>
</code></pre></div>
<h4 id="node-style">Node style<a class="headerlink" href="#node-style" title="Permanent link">&para;</a></h4>
<p>The symbols used to represent commits or operations can be customized via
templates.</p>
<ul>
<li><code>templates.log_node</code> for commits (with <code>Option&lt;Commit&gt;</code> keywords)</li>
<li><code>templates.op_log_node</code> for operations (with <code>Operation</code> keywords)</li>
</ul>
<p>For example:
<div class="highlight"><pre><span></span><code><span class="k">[templates]</span>
<span class="n">log_node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;&#39;&#39;</span>
<span class="s1">coalesce(</span>
<span class="s1"> if(!self, &quot;🮀&quot;),</span>
<span class="s1"> if(current_working_copy, &quot;@&quot;),</span>
<span class="s1"> if(root, &quot;&quot;),</span>
<span class="s1"> if(immutable, &quot;&quot;, &quot;&quot;),</span>
<span class="s1">)</span>
<span class="s1">&#39;&#39;&#39;</span>
<span class="n">op_log_node</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;if(current_operation, &quot;@&quot;, &quot;&quot;)&#39;</span>
</code></pre></div></p>
<h3 id="wrap-log-content">Wrap log content<a class="headerlink" href="#wrap-log-content" title="Permanent link">&para;</a></h3>
<p>If enabled, <code>log</code>/<code>evolog</code>/<code>op log</code> content will be wrapped based on
the terminal width.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">log-word-wrap</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<h3 id="display-of-commit-and-change-ids">Display of commit and change ids<a class="headerlink" href="#display-of-commit-and-change-ids" title="Permanent link">&para;</a></h3>
<p>Can be customized by the <code>format_short_id()</code> template alias.</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="c1"># Highlight unique prefix and show at least 12 characters (default)</span>
<span class="s1">&#39;format_short_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;id.shortest(12)&#39;</span>
<span class="c1"># Just the shortest possible unique prefix</span>
<span class="s1">&#39;format_short_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;id.shortest()&#39;</span>
<span class="c1"># Show unique prefix and the rest surrounded by brackets</span>
<span class="s1">&#39;format_short_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;id.shortest(12).prefix() ++ &quot;[&quot; ++ id.shortest(12).rest() ++ &quot;]&quot;&#39;</span>
<span class="c1"># Always show 12 characters</span>
<span class="s1">&#39;format_short_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;id.short(12)&#39;</span>
</code></pre></div>
<p>To customize these separately, use the <code>format_short_commit_id()</code> and
<code>format_short_change_id()</code> aliases:</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="c1"># Uppercase change ids. `jj` treats change and commit ids as case-insensitive.</span>
<span class="s1">&#39;format_short_change_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;format_short_id(id).upper()&#39;</span>
</code></pre></div>
<p>Operation ids can be customized by the <code>format_short_operation_id()</code> alias:</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="c1"># Always show 12 characters</span>
<span class="s1">&#39;format_short_operation_id(id)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;id.short(12)&#39;</span>
</code></pre></div>
<p>To get shorter prefixes for certain revisions, set <code>revsets.short-prefixes</code>:</p>
<div class="highlight"><pre><span></span><code><span class="k">[revsets]</span>
<span class="c1"># Prioritize the current bookmark</span>
<span class="n">short-prefixes</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;(main..@)::&quot;</span>
</code></pre></div>
<h3 id="relative-timestamps">Relative timestamps<a class="headerlink" href="#relative-timestamps" title="Permanent link">&para;</a></h3>
<p>Can be customized by the <code>format_timestamp()</code> template alias.</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="c1"># Full timestamp in ISO 8601 format</span>
<span class="s1">&#39;format_timestamp(timestamp)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;timestamp&#39;</span>
<span class="c1"># Relative timestamp rendered as &quot;x days/hours/seconds ago&quot;</span>
<span class="s1">&#39;format_timestamp(timestamp)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;timestamp.ago()&#39;</span>
</code></pre></div>
<p><code>jj op log</code> defaults to relative timestamps. To use absolute timestamps, you
will need to modify the <code>format_time_range()</code> template alias.</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="s1">&#39;format_time_range(time_range)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;time_range.start() ++ &quot; - &quot; ++ time_range.end()&#39;</span>
</code></pre></div>
<h3 id="author-format">Author format<a class="headerlink" href="#author-format" title="Permanent link">&para;</a></h3>
<p>Can be customized by the <code>format_short_signature()</code> template alias.</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="c1"># Full email address (default)</span>
<span class="s1">&#39;format_short_signature(signature)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;signature.email()&#39;</span>
<span class="c1"># Both name and email address</span>
<span class="s1">&#39;format_short_signature(signature)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;signature&#39;</span>
<span class="c1"># Username part of the email address</span>
<span class="s1">&#39;format_short_signature(signature)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;signature.email().local()&#39;</span>
</code></pre></div>
<h3 id="commit-timestamp">Commit timestamp<a class="headerlink" href="#commit-timestamp" title="Permanent link">&para;</a></h3>
<p>Commits have both an "author timestamp" and "committer timestamp". By default,
jj displays the committer timestamp, but can be changed to show the author
timestamp instead.</p>
<p>The function must return a timestamp because the return value will likely be
formatted with <code>format_timestamp()</code>.</p>
<div class="highlight"><pre><span></span><code><span class="k">[template-aliases]</span>
<span class="s1">&#39;commit_timestamp(commit)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;commit.author().timestamp()&#39;</span>
</code></pre></div>
<h3 id="signature-format">Signature format<a class="headerlink" href="#signature-format" title="Permanent link">&para;</a></h3>
<p>Can be enabled with <code>ui.show-cryptographic-signatures</code>, and
customized with <code>format_short_cryptographic_signature(sig)</code> and
<code>format_detailed_cryptographic_signature(sig)</code>.</p>
<p>Note that the formatting functions take an <code>Option&lt;CryptographicSignature&gt;</code>.
This allows you to emit a custom message if a signature is not present, but
will raise an error if you try to access methods on a signature that is not
available.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># default is false</span>
<span class="n">show-cryptographic-signatures</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
<span class="k">[template-aliases]</span>
<span class="s1">&#39;format_short_cryptographic_signature(sig)&#39;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">&#39;&#39;&#39;</span>
<span class="s1"> if(sig,</span>
<span class="s1"> sig.status(),</span>
<span class="s1"> &quot;(no sig)&quot;,</span>
<span class="s1"> )</span>
<span class="s1">&#39;&#39;&#39;</span>
</code></pre></div>
<h2 id="allow-large-revsets-by-default">Allow "large" revsets by default<a class="headerlink" href="#allow-large-revsets-by-default" title="Permanent link">&para;</a></h2>
<p>Certain commands (such as <code>jj rebase</code>) can take multiple revset arguments, but
default to requiring each of those revsets to expand to a <em>single</em> revision.
This restriction can be overridden by prefixing a revset that the user wants to
be able to expand to more than one revision with the <a href="../revsets/#the-all-modifier"><code>all:</code>
modifier</a>.</p>
<p>Another way you can override this check is by setting
<code>ui.always-allow-large-revsets</code> to <code>true</code>. Then, <code>jj</code> will allow every one of
the revset arguments of such commands to expand to any number of revisions.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Assume `all:` prefix before revsets whenever it would make a difference</span>
<span class="n">always-allow-large-revsets</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<h2 id="pager">Pager<a class="headerlink" href="#pager" title="Permanent link">&para;</a></h2>
<p>The default pager is can be set via <code>ui.pager</code> or the <code>PAGER</code> environment
variable. The priority is as follows (environment variables are marked with
a <code>$</code>):</p>
<p><code>ui.pager</code> &gt; <code>$PAGER</code></p>
<p><code>less -FRX</code> is the default pager in the absence of any other setting, except
on Windows where it is <code>:builtin</code>.</p>
<p>The special value <code>:builtin</code> enables usage of the <a href="#builtin-pager">integrated
pager</a>.</p>
<p>If you are using a standard Linux distro, your system likely already has
<code>$PAGER</code> set and that will be preferred over the built-in. To use the built-in:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--user<span class="w"> </span>ui.pager<span class="w"> </span>:builtin
</code></pre></div>
<p>It is possible the default will change to <code>:builtin</code> for all platforms in the
future.</p>
<p>Additionally, paging behavior can be toggled via <code>ui.paginate</code> like so:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Enable pagination for commands that support it (default)</span>
<span class="n">paginate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;auto&quot;</span>
<span class="c1"># Disable all pagination, equivalent to using --no-pager</span>
<span class="n">paginate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;never&quot;</span>
</code></pre></div>
<h3 id="builtin-pager">Builtin pager<a class="headerlink" href="#builtin-pager" title="Permanent link">&para;</a></h3>
<p>Our builtin pager is based on
<a href="https://github.com/markbt/streampager/"><code>streampager</code></a> but is configured within
<code>jj</code>'s config. It is configured via the <code>ui.streampager</code> table.</p>
<h4 id="key-bindings">Key bindings<a class="headerlink" href="#key-bindings" title="Permanent link">&para;</a></h4>
<p>The built-in pager supports both navigation via arrows and Vim-style navigation.
Beyond that, here are some useful keybindings for the pager:</p>
<table>
<thead>
<tr>
<th style="text-align: left;">Key</th>
<th style="text-align: left;">Action</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;"><code>Ctrl-c</code> or <code>q</code></td>
<td style="text-align: left;">Quit</td>
</tr>
<tr>
<td style="text-align: left;"><code>h</code> or <code>F1</code></td>
<td style="text-align: left;">Show all key bindings</td>
</tr>
<tr>
<td style="text-align: left;"><code>Esc</code></td>
<td style="text-align: left;">Close help or prompt</td>
</tr>
<tr>
<td style="text-align: left;"><code>\</code></td>
<td style="text-align: left;">Toggle line wrapping</td>
</tr>
<tr>
<td style="text-align: left;"><code>#</code></td>
<td style="text-align: left;">Toggle line numbers</td>
</tr>
<tr>
<td style="text-align: left;"><code>Ctrl-r</code></td>
<td style="text-align: left;">Toggle the ruler</td>
</tr>
</tbody>
</table>
<p>The built-in pager does not support mouse input.</p>
<h4 id="wrapping-config">Wrapping config<a class="headerlink" href="#wrapping-config" title="Permanent link">&para;</a></h4>
<p>Wrapping performed by the pager happens <em>in addition to</em> any
wrapping that <code>jj</code> itself does.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui.streampager]</span>
<span class="n">wrapping</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;anywhere&quot;</span><span class="w"> </span><span class="c1"># wrap at screen edge (default)</span>
<span class="n">wrapping</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;word&quot;</span><span class="w"> </span><span class="c1"># wrap on word boundaries</span>
<span class="n">wrapping</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;none&quot;</span><span class="w"> </span><span class="c1"># strip long lines, allow scrolling</span>
<span class="w"> </span><span class="c1"># left and right like `less -S`</span>
</code></pre></div>
<h4 id="auto-exit-clearing-the-screen-on-startup-or-exit">Auto-exit, clearing the screen on startup or exit<a class="headerlink" href="#auto-exit-clearing-the-screen-on-startup-or-exit" title="Permanent link">&para;</a></h4>
<p>You can configure whether the pager clears the screen on startup or exit, and
whether it quits automatically on short inputs. When the pager auto-quits,
features like word-wrapping are disabled.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui.streampager]</span>
<span class="c1"># Do not clear screen on exit. Use a full-screen interface for long</span>
<span class="c1"># output only. Like `less -FX`.</span>
<span class="n">interface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;quit-if-one-page&quot;</span><span class="w"> </span><span class="c1"># (default).</span>
<span class="c1"># Always use a full-screen interface, ask the terminal to clear the</span>
<span class="c1"># screen on exit. Like `less -+FX`.</span>
<span class="n">interface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;full-screen-clear-output&quot;</span>
<span class="c1"># Use the alternate screen if the input is either long or takes more</span>
<span class="c1"># than 2 seconds to finish. Similar but not identical to `less -F -+X`.</span>
<span class="n">interface</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;quit-quickly-or-clear-output&quot;</span>
</code></pre></div>
<h3 id="processing-contents-to-be-paged">Processing contents to be paged<a class="headerlink" href="#processing-contents-to-be-paged" title="Permanent link">&para;</a></h3>
<p>If you'd like to pass the output through a formatter e.g.
<a href="https://github.com/so-fancy/diff-so-fancy"><code>diff-so-fancy</code></a> before piping it
through a pager you must do it using a subshell as, unlike <code>git</code> or <code>hg</code>, the
command will be executed directly. For example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">pager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;sh&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-c&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;diff-so-fancy | less -RFX&quot;</span><span class="p">]</span>
</code></pre></div>
<p>Some formatters (like <a href="https://github.com/dandavison/delta"><code>delta</code></a>) require
git style diffs for formatting. You can configure this style of
diff as the default with the <code>ui.diff</code> setting. For example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">pager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;delta&quot;</span>
<span class="k">[ui.diff]</span>
<span class="n">format</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;git&quot;</span>
</code></pre></div>
<h2 id="aliases">Aliases<a class="headerlink" href="#aliases" title="Permanent link">&para;</a></h2>
<p>You can define aliases for commands, including their arguments. For example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[aliases]</span>
<span class="c1"># `jj l` shows commits on the working-copy commit&#39;s (anonymous) bookmark</span>
<span class="c1"># compared to the `main` bookmark</span>
<span class="n">l</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;log&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-r&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;(main..@):: | (main..@)-&quot;</span><span class="p">]</span>
</code></pre></div>
<p>This alias syntax can only run a single jj command. However, you may want to
execute multiple jj commands with a single alias, or run arbitrary scripts that
complement your version control workflow. This can be done, but be aware of the
danger:</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>The following technique just provides a convenient syntax for running
arbitrary code on your system. Using it irresponsibly may cause damage
ranging from breaking the behavior of <code>jj undo</code> to wiping your file system.
Exercise the same amount of caution while writing these aliases as you would
when typing commands into the terminal!</p>
<p>This feature may be removed or replaced by an embedded scripting language in
the future.</p>
</div>
<p>The command <code>jj util exec</code> will simply run any command you pass to it as an
argument. Additional arguments are passed through. Here are some examples:</p>
<div class="highlight"><pre><span></span><code><span class="k">[aliases]</span>
<span class="n">my-script</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;util&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;exec&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;my-jj-script&quot;</span><span class="p">]</span>
<span class="c1"># ^^^^</span>
<span class="c1"># This makes sure that flags are passed to your script instead of parsed by jj.</span>
<span class="n">my-inline-script</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;util&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;exec&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;bash&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-c&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;&quot;&quot;</span>
<span class="s2">#!/usr/bin/env bash</span>
<span class="s2">set -euo pipefail</span>
<span class="s2">echo &quot;Look Ma, everything in one file!&quot;</span>
<span class="s2">echo &quot;args: $@&quot;</span>
<span class="s2">&quot;&quot;&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;&quot;</span><span class="p">]</span>
<span class="c1"># ^^</span>
<span class="c1"># This last empty string will become &quot;$0&quot; in bash, so your actual arguments</span>
<span class="c1"># are all included in &quot;$@&quot; and start at &quot;$1&quot; as expected.</span>
</code></pre></div>
<h2 id="editor">Editor<a class="headerlink" href="#editor" title="Permanent link">&para;</a></h2>
<p>The default editor is set via <code>ui.editor</code>, though there are several places to
set it. The priority is as follows (environment variables are marked with
a <code>$</code>):</p>
<p><code>$JJ_EDITOR</code> &gt; <code>ui.editor</code> &gt; <code>$VISUAL</code> &gt; <code>$EDITOR</code></p>
<p>Pico is the default editor (Notepad on Windows) in the absence of any other
setting, but you could set it explicitly too.</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;pico&quot;</span>
</code></pre></div>
<p>To use NeoVim instead:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;nvim&quot;</span>
</code></pre></div>
<p>For GUI editors you possibly need to use a <code>-w</code> or <code>--wait</code>. Some examples:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;code -w&quot;</span><span class="w"> </span><span class="c1"># VS Code</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;code.cmd -w&quot;</span><span class="w"> </span><span class="c1"># VS Code on Windows</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;bbedit -w&quot;</span><span class="w"> </span><span class="c1"># BBEdit</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;subl -n -w&quot;</span><span class="w"> </span><span class="c1"># Sublime Text</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;mate -w&quot;</span><span class="w"> </span><span class="c1"># TextMate</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;C:/Program Files/Notepad++/notepad++.exe&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;-multiInst&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-notabbar&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-nosession&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-noPlugin&quot;</span><span class="p">]</span><span class="w"> </span><span class="c1"># Notepad++</span>
<span class="n">editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;idea --temp-project --wait&quot;</span><span class="w"> </span><span class="c1">#IntelliJ</span>
</code></pre></div>
<p>Obviously, you would only set one line, don't copy them all in!</p>
<h2 id="editing-diffs">Editing diffs<a class="headerlink" href="#editing-diffs" title="Permanent link">&para;</a></h2>
<p>The <code>ui.diff-editor</code> setting affects the default tool used for editing diffs
(e.g. <code>jj split</code>, <code>jj squash -i</code>). If it is not set, the special value
<code>:builtin</code> is used. It launches a built-in TUI tool (known as <a href="https://github.com/arxanas/scm-record?tab=readme-ov-file#scm-diff-editor">scm-diff-editor</a>)
to edit the diff in your terminal.</p>
<p>You can try a different tool temporarily by doing e.g. <code>jj split --tool meld</code> or
you can set the option to change the default. This requires that you have an
appropriate tool installed, see for example <a href="#using-meld-as-a-diff-editor">the instructions for using
Meld</a>.</p>
<p><strong>Suggestion:</strong> If possible, it is recommended to try an external diff tool like
<a href="#using-meld-as-a-diff-editor">Meld</a> (see below for some other possibilities)
for splitting commits and other diff editing, in addition to the built-in diff
editor. It is good to know the capabilities of both. The built-in diff editor
does not require external tools to be available, is faster for tasks like
picking hunks, and does not require leaving the terminal. External tools give
you the flexibility of picking out portions of lines from the diff or even
arbitrarily editing the text of the files.</p>
<p>If <code>ui.diff-editor</code> is a string, e.g. <code>"meld"</code>, the arguments will be read from
the following config keys.</p>
<div class="highlight"><pre><span></span><code><span class="k">[merge-tools.meld]</span>
<span class="c1"># program = &quot;meld&quot; # Defaults to the name of the tool if not specified</span>
<span class="n">program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;/path/to/meld&quot;</span><span class="w"> </span><span class="c1"># May be necessary if `meld` is not in the PATH</span>
<span class="n">edit-args</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;--newtab&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">]</span>
</code></pre></div>
<p><code>jj</code> makes the following substitutions:</p>
<ul>
<li>
<p><code>$left</code> and <code>$right</code> are replaced with the paths to the left and right
directories to diff respectively.</p>
</li>
<li>
<p>If no <code>edit-args</code> are specified, <code>["$left", "$right"]</code> are set by default.</p>
</li>
</ul>
<p>Finally, <code>ui.diff-editor</code> can be a list that specifies a command and its arguments.</p>
<p>Some examples:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Use merge-tools.meld.edit-args</span>
<span class="n">diff-editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;meld&quot;</span><span class="w"> </span><span class="c1"># Or `kdiff3`, or `diffedit3`, ...</span>
<span class="c1"># Specify edit-args inline</span>
<span class="n">diff-editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;/path/to/binary&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--be-helpful&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">]</span>
<span class="c1"># Equivalent to [&quot;binary&quot;, &quot;$left&quot;, &quot;$right&quot;] arguments by default</span>
<span class="n">diff-editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;binary&quot;</span>
</code></pre></div>
<h3 id="experimental-3-pane-diff-editing">Experimental 3-pane diff editing<a class="headerlink" href="#experimental-3-pane-diff-editing" title="Permanent link">&para;</a></h3>
<p>We offer two special "3-pane" diff editor configs:</p>
<ul>
<li><code>meld-3</code>, which requires installing <a href="https://meldmerge.org/">Meld</a>, and</li>
<li><code>diffedit3</code>, which requires installing <a href="https://github.com/ilyagr/diffedit3/releases"><code>diffedit3</code></a>.</li>
</ul>
<p><code>Meld</code> is a graphical application that is recommended, but can be difficult to
install in some situations. <code>diffedit3</code> is designed to be easy to install and to
be usable in environments where Meld is difficult to use (e.g. over SSH via port
forwarding). <code>diffedit3</code> starts a local server that can be accessed via a web
browser, similarly to <a href="https://jupyter.org/">Jupyter</a>.</p>
<p>There is also the <code>diffedit3-ssh</code> which is similar to <code>diffedit3</code> but does not
try to open the web browser pointing to the local server (the URL
printed to the terminal) automatically. <code>diffedit3-ssh</code> also always uses ports in between
17376-17380 and fails if they are all busy. This can be useful when working
over SSH. Open the fold below for more details of how to set that up.</p>
<details>
<summary> Tips for using `diffedit3-ssh` over SSH </summary>
To use `diffedit3` over SSH, you need to set up port forwarding. One way to do
this is to start SSH as follows (copy-paste the relevant lines):
<div class="highlight"><pre><span></span><code>ssh<span class="w"> </span>-L<span class="w"> </span><span class="m">17376</span>:localhost:17376<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-L<span class="w"> </span><span class="m">17377</span>:localhost:17377<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-L<span class="w"> </span><span class="m">17378</span>:localhost:17378<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-L<span class="w"> </span><span class="m">17379</span>:localhost:17379<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>-L<span class="w"> </span><span class="m">17380</span>:localhost:17380<span class="w"> </span><span class="se">\</span>
<span class="w"> </span>myhost.example.com
</code></pre></div>
`diffedit3-ssh` is set up to use these 5 ports by default. Usually, only the
first of them will be used. The rest are used if another program happens to use
one of them, or if you run multiple instances of `diffedit3` at the same time.
Another way is to add a snippet to `~/.ssh/config`:
<div class="highlight"><pre><span></span><code>Host myhost
User myself
Hostname myhost.example.com
LocalForward 17376 localhost:17376
LocalForward 17377 localhost:17377
LocalForward 17378 localhost:17378
LocalForward 17379 localhost:17379
LocalForward 17380 localhost:17380
</code></pre></div>
With that configuration, you should be able to simply `ssh myhost`.
</details>
<p>Setting either <code>ui.diff-editor = "meld-3"</code> or <code>ui.diff-editor = "diffedit3"</code>
will result in the diff editor showing 3 panes: the diff on the left and right,
and an editing pane in the middle. This allow you to see both sides of the
original diff while editing.</p>
<p>If you use <code>ui.diff-editor = "meld-3"</code>, note that you can still get the 2-pane
Meld view using <code>jj diff --tool meld</code>. <code>diffedit3</code> has a button you can use to
switch to a 2-pane view.</p>
<p>To configure other diff editors in this way, you can include <code>$output</code> together
with <code>$left</code> and <code>$right</code> in <code>merge-tools.TOOL.edit-args</code>. <code>jj</code> will replace
<code>$output</code> with the directory where the diff editor will be expected to put the
result of the user's edits. Initially, the contents of <code>$output</code> will be the
same as the contents of <code>$right</code>.</p>
<h3 id="jj-instructions"><code>JJ-INSTRUCTIONS</code><a class="headerlink" href="#jj-instructions" title="Permanent link">&para;</a></h3>
<p>When editing a diff, jj will include a synthetic file called <code>JJ-INSTRUCTIONS</code>
in the diff with instructions on how to edit the diff. Any changes you make to
this file will be ignored. To suppress the creation of this file, set
<code>ui.diff-instructions = false</code>.</p>
<h3 id="using-meld-as-a-diff-editor">Using Meld as a diff editor<a class="headerlink" href="#using-meld-as-a-diff-editor" title="Permanent link">&para;</a></h3>
<p><a href="https://meldmerge.org">Meld</a> is a nice and polished free diff editor. It can be
obtained as follows:</p>
<ul>
<li>
<p><strong>Linux:</strong> use your favorite package manager, e.g. <code>sudo apt install meld</code>.</p>
</li>
<li>
<p><strong>Windows:</strong> Meld can be downloaded from <a href="https://meldmerge.org/">https://meldmerge.org/</a>.</p>
</li>
<li>
<p><strong>Mac OS:</strong> Install Homebrew and run <code>brew install --cask dehesselle-meld</code>.
This will install both an app in <code>/Applications/Meld.app</code> and the command-line
<code>meld</code> command that <code>jj</code> uses. You can read about <a href="https://gist.github.com/ilyagr/1b40f6061d8ad320cee4c12843df1a23">more details and other
options</a> but,
as of this writing, this is by far the easiest.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p>Do <em>not</em> use the Homebrew <code>meld</code> package.
It does not work on ARM Macs and may have problems on recent versions of macOS.</p>
</div>
</li>
</ul>
<p><code>jj</code> has two diff editing configurations that use Meld: <code>meld</code> for a 2-pane view
and <code>meld-3</code> for a <a href="#experimental-3-pane-diff-editing">three-pane view</a>.</p>
<p>There is also a <code>meld</code> <a href="#3-way-merge-tools-for-conflict-resolution">merge tool</a>
that can be useful, but does not support displaying the merge base while
merging.</p>
<h3 id="using-vim-as-a-diff-editor">Using Vim as a diff editor<a class="headerlink" href="#using-vim-as-a-diff-editor" title="Permanent link">&para;</a></h3>
<p>Using <code>ui.diff-editor = "vimdiff"</code> is possible but not recommended. For a better
experience, you can follow <a href="https://github.com/jj-vcs/jj/wiki/Vim#using-vim-as-a-diff-tool">instructions from the Wiki</a> to configure the
<a href="https://github.com/will133/vim-dirdiff">DirDiff Vim plugin</a> and/or the <a href="https://github.com/balki/vimtabdiff">vimtabdiff Python script</a>.</p>
<h2 id="3-way-merge-tools-for-conflict-resolution">3-way merge tools for conflict resolution<a class="headerlink" href="#3-way-merge-tools-for-conflict-resolution" title="Permanent link">&para;</a></h2>
<p>The <code>ui.merge-editor</code> key specifies the tool used for three-way merge tools
by <code>jj resolve</code>. For example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[ui]</span>
<span class="c1"># Use merge-tools.meld.merge-args</span>
<span class="n">merge-editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;meld&quot;</span><span class="w"> </span><span class="c1"># Or &quot;vscode&quot; or &quot;vscodium&quot; or &quot;kdiff3&quot; or &quot;vimdiff&quot;</span>
<span class="c1"># Specify merge-args inline</span>
<span class="n">merge-editor</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;meld&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$base&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-o&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$output&quot;</span><span class="p">]</span>
</code></pre></div>
<p>The "vscode", "vscodium", "meld", "kdiff3", and "vimdiff" tools can be used out of the box,
as long as they are installed.</p>
<p>Using VS Code as a merge tool works well with VS Code's <a href="https://code.visualstudio.com/docs/remote/remote-overview">Remote
Development</a>
functionality, as long as <code>jj</code> is called from VS Code's terminal.</p>
<h3 id="setting-up-a-custom-merge-tool">Setting up a custom merge tool<a class="headerlink" href="#setting-up-a-custom-merge-tool" title="Permanent link">&para;</a></h3>
<p>To use a different tool named <code>TOOL</code>, the arguments to pass to the tool MUST be
specified either inline or in the <code>merge-tools.TOOL.merge-args</code> key. As an
example of how to set this key and other tool configuration options, here is
the out-of-the-box configuration of the three default tools. (There is no need
to copy it to your config file verbatim, but you are welcome to customize it.)</p>
<div class="highlight"><pre><span></span><code><span class="k">[merge-tools.kdiff3]</span>
<span class="c1"># program = &quot;kdiff3&quot; # Defaults to the name of the tool if not specified</span>
<span class="n">merge-args</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;$base&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-o&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$output&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--auto&quot;</span><span class="p">]</span>
<span class="k">[merge-tools.meld]</span>
<span class="n">merge-args</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$base&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-o&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$output&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--auto-merge&quot;</span><span class="p">]</span>
<span class="k">[merge-tools.vimdiff]</span>
<span class="n">merge-args</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;-f&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-d&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$output&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-M&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;$left&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$base&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;$right&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;-c&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;wincmd J&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-c&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;set modifiable&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;-c&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;set write&quot;</span><span class="p">]</span>
<span class="n">program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;vim&quot;</span>
<span class="n">merge-tool-edits-conflict-markers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span><span class="w"> </span><span class="c1"># See below for an explanation</span>
</code></pre></div>
<p><code>jj</code> makes the following substitutions:</p>
<ul>
<li>
<p><code>$output</code> (REQUIRED) is replaced with the name of the file that the merge tool
should output. <code>jj</code> will read this file after the merge tool exits.</p>
</li>
<li>
<p><code>$left</code> and <code>$right</code> are replaced with the paths to two files containing the
content of each side of the conflict.</p>
</li>
<li>
<p><code>$base</code> is replaced with the path to a file containing the contents of the
conflicted file in the last common ancestor of the two sides of the conflict.</p>
</li>
<li>
<p><code>$marker_length</code> is replaced with the length of the conflict markers which
should be used for the file. This can be useful if the merge tool parses
and/or generates conflict markers. Usually, <code>jj</code> uses conflict markers of
length 7, but they can be longer if necessary to make parsing unambiguous.</p>
</li>
</ul>
<h3 id="editing-conflict-markers-with-a-tool-or-a-text-editor">Editing conflict markers with a tool or a text editor<a class="headerlink" href="#editing-conflict-markers-with-a-tool-or-a-text-editor" title="Permanent link">&para;</a></h3>
<p>By default, the merge tool starts with an empty output file. If the tool puts
anything into the output file and exits with the 0 exit code,
<code>jj</code> assumes that the conflict is fully resolved, while if the tool exits with
a non-zero exit code, <code>jj</code> assumes that the merge should be cancelled.
This is appropriate for most graphical merge tools.</p>
<p>For merge tools which try to automatically resolve conflicts without user input,
this behavior may not be desired. For instance, some automatic merge tools use
an exit code of 1 to indicate that some conflicts were unable to be resolved and
that the output file should contain conflict markers. In that case, you could
set the config option <code>merge-tools.TOOL.merge-conflict-exit-codes = [1]</code> to tell
<code>jj</code> to expect conflict markers in the output file if the exit code is 1. If a
merge tool produces output using Git's "diff3" conflict style, <code>jj</code> should be
able to parse it correctly, so many Git merge drivers should be usable with <code>jj</code>
as well.</p>
<p>Some tools (e.g. <code>vimdiff</code>) can present a multi-way diff but don't resolve
conflict themselves. When using such tools, <code>jj</code>
can help you by populating the output file with conflict markers before starting
the merge tool (instead of leaving the output file empty and letting the merge
tool fill it in). To do that, set the
<code>merge-tools.vimdiff.merge-tool-edits-conflict-markers = true</code> option.</p>
<p>With this option set, if the output file still contains conflict markers after
the conflict is done, <code>jj</code> assumes that the conflict was only partially resolved
and parses the conflict markers to get the new state of the conflict. The
conflict is considered fully resolved when there are no conflict markers left.
The conflict marker style can also be customized per tool using the
<code>merge-tools.TOOL.conflict-marker-style</code> option, which takes the same values as
<a href="#conflict-marker-style"><code>ui.conflict-marker-style</code></a>.</p>
<h2 id="code-formatting-and-other-file-content-transformations">Code formatting and other file content transformations<a class="headerlink" href="#code-formatting-and-other-file-content-transformations" title="Permanent link">&para;</a></h2>
<p>The <code>jj fix</code> command allows you to efficiently rewrite files in complex commit
graphs with no risk of introducing conflicts, using tools like <code>clang-format</code> or
<code>prettier</code>. The tools run as subprocesses that take file content on standard
input and repeat it, with any desired changes, on standard output. The file is
only rewritten if the subprocess produces a successful exit code.</p>
<h3 id="enforce-coding-style-rules">Enforce coding style rules<a class="headerlink" href="#enforce-coding-style-rules" title="Permanent link">&para;</a></h3>
<p>Suppose you want to use <code>clang-format</code> to format your <code>*.c</code> and <code>*.h</code> files,
as well as sorting their <code>#include</code> directives.</p>
<p><code>jj fix</code> provides the file content anonymously on standard input, but the name
of the file being formatted may be important for include sorting or other output
like error messages. To address this, you can use the <code>$path</code> substitution to
provide the name of the file in a command argument.</p>
<div class="highlight"><pre><span></span><code><span class="k">[fix.tools.clang-format]</span>
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;/usr/bin/clang-format&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--sort-includes&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--assume-filename=$path&quot;</span><span class="p">]</span>
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;glob:&#39;**/*.c&#39;&quot;</span><span class="p">,</span>
<span class="w"> </span><span class="s2">&quot;glob:&#39;**/*.h&#39;&quot;</span><span class="p">]</span>
</code></pre></div>
<h3 id="sort-and-remove-duplicate-lines-from-a-file">Sort and remove duplicate lines from a file<a class="headerlink" href="#sort-and-remove-duplicate-lines-from-a-file" title="Permanent link">&para;</a></h3>
<p><code>jj fix</code> can also be used with tools that are not considered code formatters.</p>
<p>Suppose you have a list of words in a text file in your repository, and you want
to keep the file sorted alphabetically and remove any duplicate words.</p>
<div class="highlight"><pre><span></span><code><span class="k">[fix.tools.sort-word-list]</span>
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;sort&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-u&quot;</span><span class="p">]</span>
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;word_list.txt&quot;</span><span class="p">]</span>
</code></pre></div>
<h3 id="execution-order-of-tools">Execution order of tools<a class="headerlink" href="#execution-order-of-tools" title="Permanent link">&para;</a></h3>
<p>If two or more tools affect the same file, they are executed in the ascending
lexicographical order of their configured names. This will remain as a tie
breaker if other ordering mechanisms are introduced in the future. If you use
numbers in tool names to control execution order, remember to include enough
leading zeros so that, for example, <code>09</code> sorts before <code>10</code>.</p>
<p>Suppose you want to keep only the 10 smallest numbers in a text file that
contains one number on each line. This can be accomplished with <code>sort</code> and
<code>head</code>, but execution order is important.</p>
<div class="highlight"><pre><span></span><code><span class="k">[fix.tools.1-sort-numbers-file]</span>
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;sort&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-n&quot;</span><span class="p">]</span>
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;numbers.txt&quot;</span><span class="p">]</span>
<span class="k">[fix.tools.2-truncate-numbers-file]</span>
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;head&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-n&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;10&quot;</span><span class="p">]</span>
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;numbers.txt&quot;</span><span class="p">]</span>
</code></pre></div>
<h3 id="disabling-and-enabling-tools">Disabling and enabling tools<a class="headerlink" href="#disabling-and-enabling-tools" title="Permanent link">&para;</a></h3>
<p>Tools can be disabled and enabled with the optional <code>enabled</code> config. This
allows you to define tools globally but enable them only for specific
repositories.</p>
<p>In the user configuration, define a disabled tool for running rustfmt:</p>
<div class="highlight"><pre><span></span><code><span class="k">[fix.tools.rustfmt]</span>
<span class="n">enabled</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span>
<span class="n">command</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;rustfmt&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;--emit&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;stdout&quot;</span><span class="p">]</span>
<span class="n">patterns</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;glob:&#39;**/*.rs&#39;&quot;</span><span class="p">]</span>
</code></pre></div>
<p>Then to use the tool in a specific repository, set the <code>enabled</code> config:</p>
<div class="highlight"><pre><span></span><code>$<span class="w"> </span>jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>fix.tools.rustfmt.enabled<span class="w"> </span><span class="nb">true</span>
</code></pre></div>
<h2 id="commit-signing">Commit Signing<a class="headerlink" href="#commit-signing" title="Permanent link">&para;</a></h2>
<p><code>jj</code> can be configured to sign and verify the commits it creates using either
GnuPG or SSH signing keys.</p>
<p>To do this you need to configure a signing backend.</p>
<p>Setting the backend to <code>"none"</code> disables signing.</p>
<h3 id="gnupg-signing">GnuPG Signing<a class="headerlink" href="#gnupg-signing" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">behavior</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;own&quot;</span>
<span class="n">backend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;gpg&quot;</span>
<span class="c1">## You can set `key` to anything accepted by `gpg -u`</span>
<span class="c1">## If not set then defaults to the key associated with `user.email`</span>
<span class="c1"># key = &quot;4ED556E9729E000F&quot;</span>
<span class="c1"># key = &quot;signing@example.com&quot;</span>
</code></pre></div>
<p>By default the gpg backend will look for a <code>gpg</code> binary on your path. If you want
to change the program used or specify a path to <code>gpg</code> explicitly you can set:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">gpg</span><span class="p">.</span><span class="n">program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;gpg2&quot;</span>
</code></pre></div>
<p>Also by default the gpg backend will consider key expiry when verifying commit signatures.
To consider expired keys as valid you can set:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">gpg</span><span class="p">.</span><span class="n">allow-expired-keys</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<h4 id="pkcs12-certificates">PKCS#12 Certificates<a class="headerlink" href="#pkcs12-certificates" title="Permanent link">&para;</a></h4>
<p>PKCS#12 certificates can be used to sign commits using the <code>gpgsm</code> backend.</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">behavior</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;own&quot;</span>
<span class="n">backend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;gpgsm&quot;</span>
<span class="c1">## You can set `key` to anything accepted by `gpgsm -u`</span>
<span class="c1">## If not set then defaults to the key associated with `user.email`</span>
<span class="c1"># key = &quot;4ED556E9729E000F&quot;</span>
<span class="c1"># key = &quot;signing@example.com&quot;</span>
</code></pre></div>
<p>By default the gpgsm backend will look for a <code>gpgsm</code> binary on your path. If you want
to change the program used or specify a path to <code>gpgsm</code> explicitly you can set:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">gpgsm</span><span class="p">.</span><span class="n">program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;gpgsm&quot;</span>
</code></pre></div>
<p>Also by default the gpgsm backend will consider key expiry when verifying commit signatures.
To consider expired keys as valid you can set:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">gpgsm</span><span class="p">.</span><span class="n">allow-expired-keys</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<h3 id="ssh-signing">SSH Signing<a class="headerlink" href="#ssh-signing" title="Permanent link">&para;</a></h3>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">behavior</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;own&quot;</span>
<span class="n">backend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;ssh&quot;</span>
<span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGj+J6N6SO+4P8dOZqfR1oiay2yxhhHnagH52avUqw5h&quot;</span>
<span class="c1">## You can also use a path instead of embedding the key</span>
<span class="c1"># key = &quot;~/.ssh/id_for_signing.pub&quot;</span>
</code></pre></div>
<p>By default the ssh backend will look for a <code>ssh-keygen</code> binary on your path. If you want
to change the program used or specify a path to <code>ssh-keygen</code> explicitly you can set:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">ssh</span><span class="p">.</span><span class="n">program</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;/path/to/ssh-keygen&quot;</span>
</code></pre></div>
<p>When verifying commit signatures the ssh backend needs to be provided with an allowed-signers
file containing the public keys of authors whose signatures you want to be able to verify.</p>
<p>You can find the format for this file in the
<a href="https://man.openbsd.org/ssh-keygen#ALLOWED_SIGNERS">ssh-keygen man page</a>. This can be provided
as follows:</p>
<div class="highlight"><pre><span></span><code><span class="k">[signing]</span>
<span class="n">backends</span><span class="p">.</span><span class="n">ssh</span><span class="p">.</span><span class="n">allowed-signers</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;/path/to/allowed-signers&quot;</span>
</code></pre></div>
<h3 id="sign-commits-only-on-jj-git-push">Sign commits only on <code>jj git push</code><a class="headerlink" href="#sign-commits-only-on-jj-git-push" title="Permanent link">&para;</a></h3>
<p>Instead of signing all commits during creation when <code>signing.behavior</code> is
set to <code>own</code>, the <code>git.sign-on-push</code> configuration can be used to sign
commits only upon running <code>jj git push</code>. All mutable unsigned commits
being pushed will be signed prior to pushing. This might be preferred if the
signing backend requires user interaction or is slow, so that signing is
performed in a single batch operation.</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Configure signing backend as before, but lazily signing only on push.</span>
<span class="k">[signing]</span>
<span class="n">behavior</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;drop&quot;</span>
<span class="n">backend</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;ssh&quot;</span>
<span class="n">key</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGj+J6N6SO+4P8dOZqfR1oiay2yxhhHnagH52avUqw5h&quot;</span>
<span class="k">[git]</span>
<span class="n">sign-on-push</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<h3 id="manually-signing-commits">Manually signing commits<a class="headerlink" href="#manually-signing-commits" title="Permanent link">&para;</a></h3>
<p>You can use <a href="../cli-reference/#jj-sign"><code>jj sign</code></a>/<a href="../cli-reference/#jj-unsign"><code>jj unsign</code></a>
to sign/unsign commits manually.</p>
<div class="admonition warning">
<p class="admonition-title">Warning</p>
<p><code>jj sign</code> is always signing commits, even if they are already signed by the
user. While this is cumbersome for users signing via hardware devices, we
cannot reliably check if a commit is already signed without creating a
signature (see <a href="https://github.com/jj-vcs/jj/issues/5786">this issue</a>).</p>
</div>
<h2 id="commit-signature-verification">Commit Signature Verification<a class="headerlink" href="#commit-signature-verification" title="Permanent link">&para;</a></h2>
<p>By default signature verification and display is <strong>disabled</strong> as it incurs a
performance cost when rendering medium to large change logs.</p>
<p>If you want to display commit signatures in your templates, you can use
<code>commit.signature()</code> (see <a href="../templates/#commit-type">Commit type</a>). The
returned <a href="../templates/#cryptographicsignature-type">CryptographicSignature
Type</a> provides methods to retrieve
signature details.</p>
<h2 id="git-settings">Git settings<a class="headerlink" href="#git-settings" title="Permanent link">&para;</a></h2>
<h3 id="default-remotes-for-jj-git-fetch-and-jj-git-push">Default remotes for <code>jj git fetch</code> and <code>jj git push</code><a class="headerlink" href="#default-remotes-for-jj-git-fetch-and-jj-git-push" title="Permanent link">&para;</a></h3>
<p>By default, if a single remote exists it is used for <code>jj git fetch</code> and <code>jj git
push</code>; however if multiple remotes exist, the default remote is assumed to be
named <code>"origin"</code>, just like in Git. Sometimes this is undesirable, e.g. when you
want to fetch from a different remote than you push to, such as a GitHub fork.</p>
<p>To change this behavior, you can modify the <a href="#config-files-and-toml">repository
configuration</a> variable <code>git.fetch</code>, which can be a
single remote, or a list of remotes to fetch from multiple places:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>git.fetch<span class="w"> </span><span class="s2">&quot;upstream&quot;</span>
jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>git.fetch<span class="w"> </span><span class="s1">&#39;[&quot;origin&quot;, &quot;upstream&quot;]&#39;</span>
</code></pre></div>
<p>By default, the specified remote names matches exactly. You can also use a
<a href="../revsets/#string-patterns">string pattern</a> to select remotes using patterns:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>git.fetch<span class="w"> </span><span class="s2">&quot;glob:*&quot;</span>
jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>git.fetch<span class="w"> </span><span class="s1">&#39;[&quot;glob:remote*&quot;, &quot;glob:upstream*&quot;]&#39;</span>
</code></pre></div>
<p>Similarly, you can also set the variable <code>git.push</code> to cause <code>jj git push</code> to
push to a different remote:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>config<span class="w"> </span><span class="nb">set</span><span class="w"> </span>--repo<span class="w"> </span>git.push<span class="w"> </span><span class="s2">&quot;github&quot;</span>
</code></pre></div>
<p>Note that unlike <code>git.fetch</code>, <code>git.push</code> can currently only be a single remote.
This is not a hard limitation, and could be changed in the future if there is
demand.</p>
<h3 id="automatic-local-bookmark-creation">Automatic local bookmark creation<a class="headerlink" href="#automatic-local-bookmark-creation" title="Permanent link">&para;</a></h3>
<p>When <code>jj</code> imports a new remote-tracking bookmark from Git, it can also create a
local bookmark with the same name. This feature is disabled by default because it
may be undesirable in some repositories, e.g.:</p>
<ul>
<li>There is a remote with a lot of historical bookmarks that you don't
want to be exported to the co-located Git repo.</li>
<li>There are multiple remotes with conflicting views of that bookmark,
resulting in an unhelpful conflicted state.</li>
</ul>
<p>You can enable this behavior by setting <code>git.auto-local-bookmark</code> like so,</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="n">auto-local-bookmark</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">true</span>
</code></pre></div>
<p>This setting is applied only to new remote bookmarks. Existing remote bookmarks
can be tracked individually by using <code>jj bookmark track</code>/<code>untrack</code> commands.</p>
<div class="highlight"><pre><span></span><code><span class="c1"># import feature1 bookmark and start tracking it</span>
jj<span class="w"> </span>bookmark<span class="w"> </span>track<span class="w"> </span>feature1@origin
<span class="c1"># delete local gh-pages bookmark and stop tracking it</span>
jj<span class="w"> </span>bookmark<span class="w"> </span>delete<span class="w"> </span>gh-pages
jj<span class="w"> </span>bookmark<span class="w"> </span>untrack<span class="w"> </span>gh-pages@upstream
</code></pre></div>
<h3 id="abandon-commits-that-became-unreachable-in-git">Abandon commits that became unreachable in Git<a class="headerlink" href="#abandon-commits-that-became-unreachable-in-git" title="Permanent link">&para;</a></h3>
<p>By default, when <code>jj</code> imports refs from Git, it will look for commits that used
to be <a href="https://git-scm.com/docs/gitglossary/#Documentation/gitglossary.txt-aiddefreachableareachable">reachable</a> but no longer are reachable. Those commits will
then be abandoned, and any descendant commits will be rebased off of them (as
usual when commits are abandoned). You can disable this behavior and instead
leave the Git-unreachable commits in your repo by setting:</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="n">abandon-unreachable-commits</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span>
</code></pre></div>
<h3 id="prefix-for-generated-bookmarks-on-push">Prefix for generated bookmarks on push<a class="headerlink" href="#prefix-for-generated-bookmarks-on-push" title="Permanent link">&para;</a></h3>
<p><code>jj git push --change</code> generates bookmark names with a prefix of "push-" by
default. You can pick a different prefix by setting <code>git.push-bookmark-prefix</code>. For
example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="n">push-bookmark-prefix</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;martinvonz/push-&quot;</span>
</code></pre></div>
<h3 id="set-of-private-commits">Set of private commits<a class="headerlink" href="#set-of-private-commits" title="Permanent link">&para;</a></h3>
<p>You can configure the set of private commits by setting <code>git.private-commits</code> to
a revset. The value is a revset of commits that Jujutsu will refuse to push. If
unset, all commits are eligible to be pushed.</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="c1"># Prevent pushing work in progress or anything explicitly labeled &quot;private&quot;</span>
<span class="n">private-commits</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;description(glob:&#39;wip:*&#39;) | description(glob:&#39;private:*&#39;)&quot;</span>
</code></pre></div>
<p>If a commit is in <code>git.private-commits</code> but is already on the remote, then it is
not considered a private commit. Commits that are immutable are also excluded
from the private set.</p>
<p>Private commits prevent their descendants from being pushed, since doing so
would require pushing the private commit as well.</p>
<h3 id="git-subprocessing-behaviour">Git subprocessing behaviour<a class="headerlink" href="#git-subprocessing-behaviour" title="Permanent link">&para;</a></h3>
<p>By default, Git remote interactions are handled by spawning a <code>git</code> subprocess.
If <code>git</code> is not on your OS path, or you want to specify a particular binary,
you can:</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="n">executable-path</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;/path/to/git&quot;</span>
</code></pre></div>
<p>Previously, remote interactions were handled by
<a href="https://github.com/libgit2/libgit2"><code>libgit2</code></a> by default, which sometimes
caused <a href="https://github.com/jj-vcs/jj/issues/4979">SSH problems</a> that could not
be solved by <code>jj</code> directly. If you have any issues with the <code>git</code>
subprocessing, you can switch back to <code>libgit2</code> with:</p>
<div class="highlight"><pre><span></span><code><span class="k">[git]</span>
<span class="n">subprocess</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="kc">false</span>
</code></pre></div>
<p>Note that <code>libgit2</code> support will likely be removed in the future, so you are
encouraged to report any issues you experience with the default configuration.</p>
<h2 id="filesystem-monitor">Filesystem monitor<a class="headerlink" href="#filesystem-monitor" title="Permanent link">&para;</a></h2>
<p>In large repositories, it may be beneficial to use a "filesystem monitor" to
track changes to the working copy. This allows <code>jj</code> to take working copy
snapshots without having to rescan the entire working copy.</p>
<p>This is governed by the <code>core.fsmonitor</code> option. Currently, the valid values are
<code>"none"</code> or <code>"watchman"</code>.</p>
<h3 id="watchman">Watchman<a class="headerlink" href="#watchman" title="Permanent link">&para;</a></h3>
<p>To configure the Watchman filesystem monitor, set
<code>core.fsmonitor = "watchman"</code>. Ensure that you have <a href="https://facebook.github.io/watchman/docs/install">installed the Watchman
executable on your system</a>.</p>
<p>You can configure <code>jj</code> to use watchman triggers to automatically create
snapshots on filesystem changes by setting
<code>core.watchman.register-snapshot-trigger = true</code>.</p>
<p>You can check whether Watchman is enabled and whether it is installed correctly
using <code>jj debug watchman status</code>.</p>
<h2 id="snapshot-settings">Snapshot settings<a class="headerlink" href="#snapshot-settings" title="Permanent link">&para;</a></h2>
<h3 id="paths-to-automatically-track">Paths to automatically track<a class="headerlink" href="#paths-to-automatically-track" title="Permanent link">&para;</a></h3>
<p>All new files in the working copy that don't match the ignore patterns are
tracked by default. You can set the <code>snapshot.auto-track</code> to set which paths
get automatically tracked when they're added to the working copy. See the
<a href="../filesets/">fileset documentation</a> for the syntax. Files with paths matching
<a href="../working-copy/#ignored-files">ignore files</a> are never tracked automatically.</p>
<p>You can use <code>jj file untrack</code> to untrack a file while keeping it in the working
copy. However, first <a href="../working-copy/#ignored-files">ignore</a> them or remove them
from the <code>snapshot.auto-track</code> patterns; otherwise they will be immediately
tracked again.</p>
<h3 id="maximum-size-for-new-files">Maximum size for new files<a class="headerlink" href="#maximum-size-for-new-files" title="Permanent link">&para;</a></h3>
<p>By default, as an anti-footgun measure, <code>jj</code> will refuse to add new files to the
snapshot that are larger than a certain size; the default is 1MiB. This can be
changed by setting <code>snapshot.max-new-file-size</code> to a different value. For
example:</p>
<div class="highlight"><pre><span></span><code><span class="k">[snapshot]</span>
<span class="n">max-new-file-size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;10MiB&quot;</span>
<span class="c1"># the following is equivalent</span>
<span class="n">max-new-file-size</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">10485760</span>
</code></pre></div>
<p>The value can be specified using a human readable string with typical suffixes;
<code>B</code>, <code>MiB</code>, <code>GB</code>, etc. By default, if no suffix is provided, or the value is a
raw integer literal, the value is interpreted as if it were specified in bytes.</p>
<p>Files that already exist in the working copy are not subject to this limit.</p>
<p>Setting this value to zero will disable the limit entirely.</p>
<h2 id="ways-to-specify-jj-config-details">Ways to specify <code>jj</code> config: details<a class="headerlink" href="#ways-to-specify-jj-config-details" title="Permanent link">&para;</a></h2>
<h3 id="user-config-files">User config files<a class="headerlink" href="#user-config-files" title="Permanent link">&para;</a></h3>
<p>An easy way to find the user config file/directory is:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>config<span class="w"> </span>path<span class="w"> </span>--user
</code></pre></div>
<p>On all platforms, the user's global <code>jj</code> configurations are by default loaded in
the following precedence order (with later configs overriding earlier ones):</p>
<ul>
<li><code>$HOME/.jjconfig.toml</code></li>
<li><code>&lt;PLATFORM_SPECIFIC&gt;/jj/config.toml</code> (preferred)</li>
<li><code>&lt;PLATFORM_SPECIFIC&gt;/jj/conf.d/*.toml</code></li>
</ul>
<p>where <code>$HOME</code> represents the user's home directory (<code>%USERPROFILE%</code> on Windows),
and <code>&lt;PLATFORM_SPECIFIC&gt;</code> represents the platform-specific configuration
directory shown in the table below. The platform-specific location is
recommended for better integration with platform services.</p>
<p>The files in the <code>conf.d</code> directory are loaded in lexicographic order. This allows
configs to be split across multiple files and combines well
with <a href="#conditional-variables">Conditional Variables</a>.</p>
<table>
<thead>
<tr>
<th style="text-align: left;">Platform</th>
<th style="text-align: left;">Location of <code>&lt;PLATFORM_SPECIFIC&gt;</code> dir</th>
<th style="text-align: left;">Example config file location</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: left;">Linux</td>
<td style="text-align: left;"><code>$XDG_CONFIG_HOME</code> or <code>$HOME/.config</code></td>
<td style="text-align: left;"><code>/home/alice/.config/jj/config.toml</code></td>
</tr>
<tr>
<td style="text-align: left;">macOS</td>
<td style="text-align: left;"><code>$HOME/Library/Application Support</code></td>
<td style="text-align: left;"><code>/Users/Alice/Library/Application Support/jj/config.toml</code></td>
</tr>
<tr>
<td style="text-align: left;">Windows</td>
<td style="text-align: left;"><code>{FOLDERID_RoamingAppData}</code></td>
<td style="text-align: left;"><code>C:\Users\Alice\AppData\Roaming\jj\config.toml</code></td>
</tr>
</tbody>
</table>
<p>The location of the <code>jj</code> user config files/directories can also be overridden with the
<code>JJ_CONFIG</code> environment variable. If it is not empty, it will be used instead
of any configuration files in the default locations. If it is a path to a TOML
file, then that file will be loaded instead. If it is a path to a directory,
then all the TOML files in that directory will be loaded in lexicographic order
and merged. Multiple paths can be specified by separating them with a
platform-specific path separator (<code>:</code> on Unix-like systems, <code>;</code> on Windows).</p>
<p>For example, the following could be used to run <code>jj</code> without loading any user configs:</p>
<div class="highlight"><pre><span></span><code><span class="nv">JJ_CONFIG</span><span class="o">=</span><span class="w"> </span>jj<span class="w"> </span>log<span class="w"> </span><span class="c1"># Ignores any settings specified in the config file.</span>
</code></pre></div>
<h3 id="json-schema-support">JSON Schema Support<a class="headerlink" href="#json-schema-support" title="Permanent link">&para;</a></h3>
<p>Many popular editors support TOML file syntax highlighting and validation. To
enable schema validation in your editor, add this line at the top of your TOML
config files:</p>
<div class="highlight"><pre><span></span><code><span class="s2">&quot;$schema&quot;</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;https://jj-vcs.github.io/jj/latest/config-schema.json&quot;</span>
</code></pre></div>
<p>This enables features like:</p>
<ul>
<li>Autocomplete for config keys</li>
<li>Type checking of values</li>
<li>Documentation on hover</li>
<li>Validation of settings</li>
</ul>
<p>Here are some popular editors with TOML schema validation support:</p>
<ul>
<li>
<p>VS Code</p>
<ul>
<li>Install <a href="https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml">Even Better TOML</a></li>
</ul>
</li>
<li>
<p>Neovim/Vim</p>
<ul>
<li>Use with <a href="https://github.com/neovim/nvim-lspconfig">nvim-lspconfig</a> and <a href="https://github.com/tamasfe/taplo">taplo</a></li>
</ul>
</li>
<li>
<p>Helix</p>
<ul>
<li>Install <a href="https://github.com/tamasfe/taplo">taplo</a></li>
</ul>
</li>
<li>
<p>JetBrains IDEs (IntelliJ, PyCharm, etc)</p>
<ul>
<li>Install <a href="https://plugins.jetbrains.com/plugin/8195-toml">TOML</a> plugin</li>
</ul>
</li>
<li>
<p>Emacs</p>
<ul>
<li>Install <a href="https://github.com/emacs-lsp/lsp-mode">lsp-mode</a> and <a href="https://github.com/dryman/toml-mode.el">toml-mode</a></li>
<li>Configure <a href="https://github.com/tamasfe/taplo">taplo</a> as the LSP server</li>
</ul>
</li>
</ul>
<h3 id="specifying-config-on-the-command-line">Specifying config on the command-line<a class="headerlink" href="#specifying-config-on-the-command-line" title="Permanent link">&para;</a></h3>
<p>You can use one or more <code>--config</code>/<code>--config-file</code> options on the command line
to specify additional configuration settings. This overrides settings defined in
config files or environment variables. For example,</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Must not have spaces around the `=`</span>
jj<span class="w"> </span>--config<span class="w"> </span>ui.color<span class="o">=</span>always<span class="w"> </span>--config<span class="w"> </span>ui.diff-editor<span class="o">=</span>meld<span class="w"> </span>split
</code></pre></div>
<p>Config value should be specified as a TOML expression. If string value isn't
enclosed by any TOML constructs (such as array notation), quotes can be omitted.
Here is an example with more advanced TOML constructs:</p>
<div class="highlight"><pre><span></span><code><span class="c1"># Single quotes and the &#39;\&#39; are interpreted by the shell and assume a Unix shell</span>
<span class="c1"># Double quotes are passed to jj and are parsed as TOML syntax</span>
jj<span class="w"> </span>log<span class="w"> </span>--config<span class="w"> </span><span class="se">\</span>
<span class="w"> </span><span class="s1">&#39;template-aliases.&quot;format_timestamp(timestamp)&quot;=&quot;&quot;&quot;timestamp.format(&quot;%Y-%m-%d %H:%M %:::z&quot;)&quot;&quot;&quot;&#39;</span>
</code></pre></div>
<p>To load an entire TOML document, use <code>--config-file</code>:</p>
<div class="highlight"><pre><span></span><code>jj<span class="w"> </span>--config-file<span class="o">=</span>extra-config.toml<span class="w"> </span>log
</code></pre></div>
<h3 id="conditional-variables">Conditional variables<a class="headerlink" href="#conditional-variables" title="Permanent link">&para;</a></h3>
<p>You can conditionally enable config variables by using <code>--when</code>.</p>
<h4 id="using-scope-tables">Using <code>[[--scope]]</code> tables<a class="headerlink" href="#using-scope-tables" title="Permanent link">&para;</a></h4>
<p>Variables defined in <code>[[--scope]]</code> tables are expanded to the root table.
<code>--when</code> specifies the condition to enable the scope table.</p>
<p>If no conditions are specified, the table is always enabled. If multiple
conditions are specified, their intersection is used.</p>
<div class="highlight"><pre><span></span><code><span class="k">[user]</span>
<span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR NAME&quot;</span>
<span class="n">email</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR_DEFAULT_EMAIL@example.com&quot;</span>
<span class="c1"># override user.email if the repository is located under ~/oss</span>
<span class="k">[[--scope]]</span>
<span class="n">--when</span><span class="p">.</span><span class="n">repositories</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;~/oss&quot;</span><span class="p">]</span>
<span class="k">[--scope.user]</span>
<span class="n">email</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR_OSS_EMAIL@example.org&quot;</span>
<span class="c1"># disable pagination for `jj status`, use `delta` for `jj diff` and `jj show`</span>
<span class="k">[[--scope]]</span>
<span class="n">--when</span><span class="p">.</span><span class="n">commands</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;status&quot;</span><span class="p">]</span>
<span class="k">[--scope.ui]</span>
<span class="n">paginate</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;never&quot;</span>
<span class="k">[[--scope]]</span>
<span class="n">--when</span><span class="p">.</span><span class="n">commands</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;diff&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;show&quot;</span><span class="p">]</span>
<span class="k">[--scope.ui]</span>
<span class="n">pager</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;delta&quot;</span>
</code></pre></div>
<h4 id="using-multiple-files">Using multiple files<a class="headerlink" href="#using-multiple-files" title="Permanent link">&para;</a></h4>
<p><code>--when</code> can also be used on the top level of a TOML file, which is convenient
when splitting your config across multiple files.
The behavior of conditions are the same as when using <code>[[--scope]]</code> tables.</p>
<div class="highlight"><pre><span></span><code><span class="c1"># In $XDG_CONFIG_HOME/jj/config.toml</span>
<span class="k">[user]</span>
<span class="n">name</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR NAME&quot;</span>
<span class="n">email</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR_DEFAULT_EMAIL@example.com&quot;</span>
</code></pre></div>
<div class="highlight"><pre><span></span><code><span class="c1"># In $XDG_CONFIG_HOME/jj/conf.d/work.toml</span>
<span class="n">--when</span><span class="p">.</span><span class="n">repositories</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;~/the/work/repo&quot;</span><span class="p">]</span>
<span class="k">[user]</span>
<span class="n">email</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;YOUR_WORK_EMAIL@workplace.com&quot;</span>
<span class="k">[revset-aliases]</span>
<span class="n">work</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s2">&quot;heads(::@ ~ description(exact:&#39;&#39;))::&quot;</span>
<span class="k">[aliases]</span>
<span class="n">wip</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;log&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;-r&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;work&quot;</span><span class="p">]</span>
</code></pre></div>
<h4 id="available-condition-keys">Available condition keys<a class="headerlink" href="#available-condition-keys" title="Permanent link">&para;</a></h4>
<ul>
<li>
<p><code>--when.repositories</code>: List of paths to match the repository path prefix.</p>
<p>Paths should be absolute. Each path component (directory or file name, drive
letter, etc.) is compared case-sensitively on all platforms. A path starting
with <code>~</code> is expanded to the home directory. On Windows, directory separator may
be either <code>\</code> or <code>/</code>. (Beware that <code>\</code> needs escape in double-quoted strings.)</p>
<p>Use <code>jj root</code> to see the workspace root directory. Note that the repository path
is in the main workspace if you're using multiple workspaces with <code>jj
workspace</code>.</p>
</li>
<li>
<p><code>--when.commands</code>: List of subcommands to match.</p>
<p>Subcommands are space-separated and matched by prefix.</p>
<div class="highlight"><pre><span></span><code><span class="n">--when</span><span class="p">.</span><span class="n">commands</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;file&quot;</span><span class="p">]</span><span class="w"> </span><span class="c1"># matches `jj file show`, `jj file list`, etc</span>
<span class="n">--when</span><span class="p">.</span><span class="n">commands</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;file show&quot;</span><span class="p">]</span><span class="w"> </span><span class="c1"># matches `jj file show` but *NOT* `jj file list`</span>
<span class="n">--when</span><span class="p">.</span><span class="n">commands</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">[</span><span class="s2">&quot;file&quot;</span><span class="p">,</span><span class="w"> </span><span class="s2">&quot;log&quot;</span><span class="p">]</span><span class="w"> </span><span class="c1"># matches `jj file` *OR* `jj log` (or subcommand of either)</span>
</code></pre></div>
</li>
</ul>
</article>
</div>
<script>var target=document.getElementById(location.hash.slice(1));target&&target.name&&(target.checked=target.name.startsWith("__tabbed_"))</script>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-copyright">
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
</div>
</div>
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "..", "features": [], "search": "../assets/javascripts/workers/search.f8cc74c7.min.js", "translations": {"clipboard.copied": "Copied to clipboard", "clipboard.copy": "Copy to clipboard", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.placeholder": "Type to start searching", "search.result.term.missing": "Missing", "select.version": "Select version"}, "version": {"alias": true, "provider": "mike"}}</script>
<script src="../assets/javascripts/bundle.f1b6f286.min.js"></script>
</body>
</html>