Version control
Git and Jujutsu configuration, aliases, completion, and terminal UIs.
modules/home/vcs/
owns Git, Jujutsu (jj), and their terminal
interfaces. It is part of the minimal profile.
For how these pieces are used day to day, see
Working with jj.
Git
Git uses the shared identity and rebases on git pull. A prepare-commit-msg
hook drafts commit messages with Claude Code; see
Commit message drafting.
Jujutsu
jj uses the same identity. Its editor is a small wrapper,
jj-commit-editor, which runs the same drafting hook in jj mode and then opens
$EDITOR. The draft description template includes the diff
(builtin_draft_commit_description_with_diff), which gives the hook something
to summarise.
Aliases
| Alias | What it does |
|---|---|
jj logn | Shows trunk()..@ plus the parent of that range: a compact view of local, unpublished work |
jj pull | Fetches from the Git remote, then rebases the mutable stack rooted at roots(trunk()..stack(@)) onto trunk() |
jj sync | Runs pull, then pushes every bookmark in the current stack with -b exact:<name>, which also tracks new bookmarks on their first push; prints a message instead when the stack has no bookmarks |
pull and sync run through jj util exec with sh -c, so the fetch,
rebase, and push run as one sequence that stops at the first failure. The
rebase source only moves the unpushed stack and leaves already-merged history
alone.
The stack(x) revset alias is reachable(x, mutable()): the mutable commits
connected to x. sync pushes only bookmarks inside stack(@), so bookmarks
on unrelated stacks are left alone.
Zsh completion for jj
jj's dynamic completer only offers changed paths and matches them by literal
prefix, so a partial path such as m/h/f did not expand. The module adds a
wrapper, _jj_with_files, that loads jj's completer on first use, runs it, and
falls back to Zsh's _files when it returns no matches and the current word is
not a flag. The block is ordered at 1010 so it runs after the
shell module's initialisation.
Terminal interfaces
- LazyGit, with shell integration, for Git repositories.
- BlazingJJ, for jj repositories.
Both are for shell use; Neovim has its own VCS interface.
Last updated on