use-jj-not-git
Guidance for using Jujutsu (jj) for version control. Use this skill when you would use git in order to make and edit commits properly, or for help to understand jj commands or concepts (working copy, changes, conflicts, operation log, bookmarks, revsets), troubleshoot jj issues, configure jj settings, understand jj workflows, translate Git commands to jj, or work with jj repositories. Also trigger when users mention "jujutsu", version control, or commits.
When & Why to Use This Skill
This Claude skill provides comprehensive guidance for using Jujutsu (jj), a next-generation version control system designed for speed and flexibility. It helps developers master jj's unique features like the staging-area-free workflow, operation logs for easy undos, and powerful revset queries, while offering a seamless transition path for those moving from Git.
Use Cases
- Migrating from Git to Jujutsu: Seamlessly translate familiar Git commands and concepts into jj equivalents to maintain productivity while adopting a more modern VCS.
- Streamlined Commit Management: Leverage jj's 'working copy' and auto-amend features to manage changes and commit messages without the overhead of a manual staging area.
- Advanced Troubleshooting and Recovery: Use the operation log to view history and perform instant undos of any version control operation, providing a safety net for complex repository manipulations.
- Complex Workflow Navigation: Master advanced concepts such as revsets for precise change selection, conflict resolution strategies, and managing bookmarks for GitHub-compatible PR workflows.
| name | use-jj-not-git |
|---|---|
| description | Guidance for using Jujutsu (jj) for version control. Use this skill when you would use git in order to make and edit commits properly, or for help to understand jj commands or concepts (working copy, changes, conflicts, operation log, bookmarks, revsets), troubleshoot jj issues, configure jj settings, understand jj workflows, translate Git commands to jj, or work with jj repositories. Also trigger when users mention "jujutsu", version control, or commits. |
Jujutsu (jj) Commit Guide
Use jj instead of git for all version control operations.
Making Commits
No staging area - Files are automatically tracked. Just edit files and commit.
# Describe current change (like writing a commit message)
jj describe -m "Add feature X"
# Finalize current change and start a new empty one
jj commit -m "Add feature X"
# Start new change on top of current (like git commit without -a)
jj new -m "Next task"
# Start new change on main
jj new main -m "Start feature"
Key Differences from Git
@= working copy (current change)@-= parent of working copy- Changes auto-amend - editing files updates the current change
- Use
jj squashto move changes into parent (likegit commit --amend) - Use
jj squash -ifor interactive selection
Quick Reference
| Task | Command |
|---|---|
| Set commit message | jj describe -m "message" |
| Finalize and continue | jj commit -m "message" |
| Start new change | jj new or jj new main |
| Amend into parent | jj squash |
| View status | jj st |
| View log | jj log |
| Push to remote | jj git push --change @ |
| Undo last operation | jj undo |
References
For detailed guidance, read references/ files:
git-to-jj-commands.md- Comprehensive Git → jj command mappinggit-comparison.md- Conceptual differences from Gitworking-copy.md- How automatic commits workbookmarks.md- Managing bookmarks (branches)github.md- Fork workflows and PRsconflicts.md- Conflict resolutionoperation-log.md- Undo and operation historyrevsets.md- Query syntax (@,@-,main..@, etc.)config.md- Configuration optionstutorial.md- Step-by-step introductiondivergence.md- Handling divergent changesmultiple-remotes.md- Multi-remote setupsgit-compatibility.md- Colocated repos and Git interop