Commands
As long as there are no conflicts, you can treat Jujutsu's local Bookmarks just like Git's local branches. Here are the commands to use:
| Goal | Jujutsu command | Git command |
|---|---|---|
| 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: you can use a single letter for Bookmark-related commands. For example, instead of
jj bookmark list, justjj b lwill do.
Give these commands a try:
jj bookmark create my-branch -r x
jj bookmark set my-branch -r y
jj bookmark delete my-branch