Jujutsu (jj) Crash Course
Jujutsu (jj) is a next-generation version control system that modernizes the way we interact with code history. JJHub is built natively to support jj’s unique features, such as first-class conflicts, stable change IDs, and automatic committing.
This crash course covers the essential commands you’ll need to use jj effectively.
1. Initializing and Cloning
To create a new repository:2. No More git add or git commit
In jj, the working directory is automatically tracked as a change. As soon as you modify files, jj updates the current change automatically. There is no staging area (git add) and no need to constantly git commit.
To view your current changes:
3. Creating a New Change
To start working on something else, you create a new change. This leaves your previous change behind and starts a fresh one on top of it:main, instead of your current change:
4. Bookmarks (Branches)
Injj, what Git calls branches are called bookmarks. They are essentially pointers to specific changes.
To create a bookmark at your current change:
main bookmark to your current change:
@ is a special symbol in jj that refers to the working copy’s change.)
5. Reviewing Log History
jj has a beautiful and intuitive log view:
qzknlmop) and commit hashes.
6. Pushing Changes
To push your changes to JJHub, you use thegit push command bridged by jj:
Next Steps
Now that you know the basics, learn howjj commands translate from Git in our Git to jj Cheat Sheet.