Welcome to Learn jj-vcs, a beginner-friendly guide to Jujutsu Version Control (jj). jj is a modern version control system designed to simplify common workflows and improve on Git’s history management, all while staying fully compatible with existing Git repositories.
This project will guide you through everyday version control tasks, from committing and pushing changes to managing your project's history. You'll learn to use jj locally for a smoother workflow while continuing to use platforms like GitHub for collaboration.
- Cleaner History:
jjrethinks how version control works, making it easier to create and maintain a clean, linear history. - Git Compatibility: It works seamlessly with Git, so you can keep using GitHub, GitLab, and other platforms without any migration.
- Local-First: All of
jj's powerful features are local. You can rewrite history, amend commits, and reorder changes without affecting your remote repository until you're ready to push.
- Developers who use Git for daily tasks like
commit,push, andpull. - Anyone new to
jj—no prior experience with Jujutsu is required. - Those curious about a simpler, faster, and more intuitive version control system.
- How to set up and manage a repository with
jj. - How to commit, inspect, and share your changes.
- How to use
jjalongside GitHub for collaborative work. - A solid foundation for moving on to more advanced
jjworkflows.
Before you begin, make sure you have the following tools installed and set up.
- A GitHub account or another Git hosting provider.
- Git installed on your system.
jj(Jujutsu) installed on your system.
You can install jj using your system’s package manager or from source. For official installation instructions, visit the link below.
👉 https://jj-vcs.github.io/jj/latest/install-and-setup
After installing, confirm everything is working by checking the version and listing the available commands.
jj --version
jj helpjj works seamlessly with Git repositories. You can use jj commands in any Git-managed folder, and they will work as expected.
jj git init --colocateto start working in existing Git-managed folder.jj git cloneto clone GitHub-hosted repositories.jj git pushto push your changes as Git commits.
No migration or conversion is needed—just start using jj.
To start working with a GitHub-hosted project, you can clone it using the jj command just like you would with Git.
jj git clone https://github.com/<your-username>/<your-repo-name>.gitThis creates a local workspace with the repository contents. The jj metadata is stored in a hidden .jj/ folder, and your repository is now fully compatible with jj and Git.
After cloning, you will have a local copy of your repository and a clean working copy ready for changes. The working copy is the current state of your files on disk.
In jj, the @ symbol represents your working copy. Use jj status to see its current state.
jj statusOpen a file, like README.md, in your editor and add some simple text. For example, a single line at the bottom:
This is my first experiment using `jj` instead of `git`.Unlike Git, jj tracks your working copy continuously. To commit your change, you'll first create a new, empty change on top of your current one, and then describe it.
# Add a message to describe the change
jj commit -m "📚 docs(readme): add a first test line using jj"You can inspect the new change using jj log.
jj logWhen you’re ready to share your changes with the remote repository:
# Assuming have branch name `main`
jj bookmark set main -revision @-
jj git pushjj will push your changes to the remote, just as you would expect.
In jj, bookmarks are named pointers to specific revisions. They are the jj equivalent of Git branches but with important differences:
- Static Pointers: A bookmark stays at the same revision until you explicitly move it.
- No "Current" Bookmark: Your working copy operates on a revision directly, not on a bookmark.
- Pushable: Bookmarks can be pushed to Git remotes, where they behave like standard Git branches.
# List local bookmarks
jj bookmark list
# Create a new bookmark at the current revision (@)
jj bookmark create my-featureTo work on a specific change, you either edit it directly or create a new change on top of it.
# Set your working copy to the revision pointed to by a bookmark
jj edit my-feature
# Start a new change on top of an existing bookmark
jj new my-featurejj git push --bookmark my-featureGitHub will interpret this as a new branch, allowing you to open a pull request as you normally would.
Understanding how to inspect your work is a core skill in jj.
jj log is your primary tool for exploring the commit graph.
jj logUse the --reversed flag to show the history from oldest to newest.
jj log --reversedThe @ symbol represents your working copy. To see what you've changed relative to the parent revision:
jj diffjj evolog is one of jj's most powerful tools. It shows a complete history of how a change evolved—including all of its rewrites, amendments, and modifications.
jj evologIf you create a change with jj new and decide not to keep it, simply abandon it.
jj abandonThis discards the current change and restores your working copy to the parent revision.
To move your working copy to a different revision (like main), use jj edit.
jj edit mainBecause bookmarks are static, you must explicitly move or delete them.
# Point a bookmark to the current revision
jj bookmark move my-feature
# Remove a bookmark
jj bookmark delete my-featureTo get the latest changes from the remote:
jj git fetchTo send your local changes and bookmarks to the remote:
jj git pushCongratulations 🎉! You’ve now learned how to use jj for everyday version control tasks: cloning, committing, pushing, and managing your local repository.
This is more than enough to replace Git in your daily workflow. When you’re ready, jj offers powerful history-rewriting tools:
- Amending & Editing Commits—Safely rewrite messages or adjust history.
- Stacked Changes—Manage multiple in-progress changes more cleanly than with branches.
- Rebasing & Reordering—Refine your history into a polished narrative.
- Conflict Handling—Resolve merge conflicts more intuitively.
You’ve built a solid foundation. Here's where to go next:
- Explore the official
jjdocumentation. - Keep an eye out for our Advanced Guide, where we'll dive into history editing, stacked diffs, and more.
Keep practicing the basics—mastery comes from real use. The advanced workflows will feel natural once you're comfortable with
jj's mental model.