Tracking Remote Bookmarks
Important
You see how to reveal hidden remote branch Changes and make them mutable.
How do you tell Jujutsu you want to work on foo, so it:
- Stops hiding its Changes?
- Stops treating them as immutable?
You just declare that you want a local Bookmark foo tracking the
remote Bookmark foo@origin:
jj bookmark track foo
Started tracking 1 remote bookmarks.
@ p (empty)
│ ○ s **foo**
├─╯
◆ u **main**
│
~
jj bookmark list foo
**foo**: stnkrwop 00687915 (no description set)
**@git**: stnkrwop 00687915 (no description set)
**@origin**: stnkrwop 00687915 (no description set)
Everything checks out:
- A local Bookmark
foowas created. - Consequently, a Git branch
foo(foo@git) appeared. - The remote Bookmark
foo@originis displayed, properly indented underfoo, indicating thatfoois tracking it.
Unlike Git, all 3 Bookmarks must share the exact same name.
Run jj log again:
@ p (empty)
│ ○ s **foo**
├─╯
◆ u **main**
│
~
As expected:
fooChanges are not hidden anymore.- And are no longer immutable (see
○instead of◆?)
I guess now you understand why, after jj git clone, I always
suggested to run:
jj bookmark track '*'
Tracking bar
Quiz time:
Warning
Track
bartoo.
Tip
jj bookmark track bar --remote=originOr abbreviated:
jj b t bar
The log now shows:
@ p (empty)
│ ○ s **foo**
├─╯
│ ○ o **bar**
├─╯
◆ u **main**
│
~
Bravo!
It’s time to play with fetch and push.