Jujutsu (jj) usage
Apps & AutomationJujutsu (jj) usage is an Agent Skill for apps & automation published in the carbon-language/carbon-lang repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Instructions for using Jujutsu (jj) for version control in the Carbon repository.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/carbon-language/carbon-lang/blob/HEAD/.agents/skills/jj/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/jujutsu-jj-usage, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Jujutsu (jj) usage
Jujutsu is a Git-compatible version control system that may be used in Carbon checkouts.
[!IMPORTANT] You can detect if Jujutsu is in use by checking for a
.jjdirectory in the repository root. If present, you must usejjand must not usegit. If absent, you must not usejj.
General usage
Always use the --no-pager flag when invoking jj to prevent the command from
blocking or waiting for terminal paging.
Common commands
Syncing with remote
- Fetch from remote:
jj --no-pager git fetch - Create a new change on top of trunk:
jj --no-pager new trunk - Show repository status:
jj --no-pager status - Show commit history:
jj --no-pager log
Managing changes
- View diff of current changes:
jj --no-pager diff - Commit changes:
jj --no-pager commit- Note: Prefer using
jj commitover the combination ofjj describeandjj new.
- Note: Prefer using
- Abandon/discard current changes:
jj --no-pager abandon - Rebase current change onto trunk:
jj --no-pager rebase -o trunk