## How to start (without breaking GitHub) - In an existing Git repo: run this once in the repo root `jj git init --colocate` (This makes the repo usable by both Git and jj.) - Or clone a GitHub repo directly with jj: `jj git clone https://github.com/owner/repo.git` - Configure the remote as usual (jj uses Git remotes): `jj git remote add origin ` - Push: `jj git push --all` or push a single bookmark: `jj git push --bookmark main` - Pull/update (jj doesn’t have a one-shot pull): `jj git fetch` → then rebase your work: `jj rebase -d ` ## Git ⇄ jj cheat-sheet (most common) (Left: Git command → Right: jj equivalent) `git init` → `jj git init [--colocate]` `git clone ` → `jj git clone ` `git status` → `jj st` `git diff` → `jj diff` `git show ` → `jj show ` `git log --oneline --graph` → `jj log -r ::@` (or `jj log`) `git fetch` → `jj git fetch` `git push --all` → `jj git push --all` `git push origin ` → `jj git push --bookmark [--remote origin]` `git branch (list)` → `jj bookmark list` `git branch ` → `jj bookmark create -r ` `git branch -f ` → `jj bookmark move --to ` `git branch -d ` → `jj bookmark delete ` `git switch -c topic main` → `jj new main` (start a new change on top of main) `git merge A` → `jj new @ A` (create a merge change with A) `git rebase B A` → `jj rebase -b A -d B` `git cherry-pick X` → `jj duplicate X -d ` `git commit -a` → `jj commit` (finish current change, start a new one) `git commit --amend` → jj squash (or jj describe to edit the message) `git restore ` / `git checkout -- ` → `jj restore ` `git reset --hard` (drop WIP) → `jj abandon` `git revert ` → `jj revert -r -B @` `git blame ` → `jj file annotate ` ## A couple of jj concepts to know Bookmarks ≈ Branches: jj uses bookmarks that map 1:1 to Git branches when you push/fetch. So `jj git push --bookmark foo` updates branch foo on GitHub. Working copy is a real commit: edits update your current change; you “finish” it with `jj commit`, and tools like `jj split`, `jj squash`, and `jj rebase` make rewriting history much nicer.