Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement! To install Jujutsu (jj) using Homebrew, run:
General Tips¶
jj ecourages small and frequently commits
easier to check local diffs
more flexible and granular control over changes You can always consolidate commits later using
jj squash.
If you run
jj squashand the working copy doesn’t have a commit message yet, it will directly use the parent commit’s message. You can also specify files to squash instead of squashing all changed files.jj squashandjj abandonalways create an empty working copy. If you are on an empty working copy, running those commands won’t help. You have to either move the working copy to the (non-empty) parent commit first and then run those commands, or specify revisions manually.
Installation Using Homebrew (Linux / macOS)¶
brew install jjJujutsu Configuration¶
Identity Configuration¶
After installation, you should configure your identity:
jj config set --user user.name "Your Name"
jj config set --user user.email "your.email@example.com"Interaction with Git Configurations¶
Jujutsu respects
.gitignorefiles and alsocore.excludesFile(if defined) from.gitignore.Settings in
.gitinore(other thancore.excludesFile) are not read by Jujutsu at this time.In a Git-backed repo, jj reads remote names and URLs directly from the .git/config so that commands like
jj git fetchandjj git pushwork seamlessly.In “colocated” mode, jj and Git share the same underlying commit objects and branch references.
Jujutsu Configuration Levels¶
Jujutsu resolves configuration in the following order (higher number overrides lower):
Built-in: Default settings.
User:
~/.config/jj/config.toml(global for you).Repo-managed:
.config/jj/config.toml(committed to the project).Repo-local:
.jj/repo/config.toml(private to your local clone and should never be committed).Workspace-local:
.jj/workspaces/<name>/config.toml(if using multiple workspaces).Command-line: arguments passed via --config-toml.
Manage Jujutsu Configurations¶
View current config.
jj config listEdit user config.
jj config edit --user Find config file path.
jj config path --userUse Jujutsu with a Git Repository¶
jj git init --colocateSome Useful jj Commands¶
Update the author on a commit.
jj metaedit -r @ --update-authorMoves the working copy back to the parent commit.
jj edit @-Pushes the parent commit to the remote, creating a tracking branch for it automatically if needed.
jj git push --change @-This is the standard jj workflow for opening a pull request — you don’t manage branch names manually; jj derives them from change IDs.
Pushes the parent commit to the remote under an explicit branch name you choose.
jj git push --named new-branch=@-