Commands
As long as there are no conflicts, you can treat Jujutsu’s local Bookmarks exactly like Git’s local branches.
| Goal | Jujutsu command and its Git equivalent |
|---|---|
| List | jj bookmark list |
git branch -v | |
| Create new | jj bookmark create <NAME> |
git branch <NAME> | |
| New or Update | jj bookmark set <NAME> -r <REV> |
git branch -f <NAME> <REV> | |
| Rename | jj bookmark rename <OLD> <NEW> |
git branch -m <OLD> <NEW> | |
| Move | jj bookmark move <NAME> --to <REV> |
git branch -f <NAME> <REV> | |
| Follow commits | jj bookmark advance <NAME> --to <REV> |
Automatically performed by git commit | |
| Delete locally | jj bookmark forget <NAME> |
git branch -d <NAME> | |
| Delete locally and remotely | jj bookmark delete <NAME> |
git branch -d <NAME> +git push <REMOTE> --delete <NAME> |
Hint: Use a single letter for Bookmark commands. Instead of
jj bookmark list,jj b lworks perfectly.
Creating, moving and deleting local branches is trivial:
jj bookmark create my-branch -r x
jj bookmark set my-branch -r y
jj bookmark delete my-branch