Clone
Important
You learn how to invoke Git from Jujutsu.
Enough with fictional repositories. Let’s use this one:
https://codeberg.org/arialdo/jj-playground.git
It contains code from the React.js Tic Tac Toe tutorial.
Warning
Clone it using only
jj. Checkjj git --helpfor options.
Tip
Easy, right?
jj git clone https://codeberg.org/arialdo/jj-playground.git
jj git cloneis equivalent togit clone+jj init. Check outjj git --helpfor the other commands.
jj log shows only 2 Changes and marks one with a diamond ◆,
meaning it’s immutable:
@ o ▢
◆ k 🔒 Displays X X **main**
│
~
main is a Git branch (a Bookmark, in Jujutsu’s lingo).
For reference, here are the symbols jj log uses:
| Symbol | Meaning |
|---|---|
○ | Mutable node |
◆ | Immutable node |
@ | The Current Change |
@ | The Current Change, immutable |
Immutable nodes prevent modifying published commits. For simplicity, we’ll disable this protection by adding a local Bookmark for each remote branch:
jj bookmark track '*'
You’ll learn about branches and remotes in Bookmarks.
Ready to go! The log should look like this:
@ ok ▢
│ ○ qn Add the CSS file **css**
│ ○ rt Link to CSS
│ │ ○ oz Play instructions **manual**
│ │ ○ kx Play manual
│ ├─╯
│ │ ○ z Click alternates Xs and Os **dev**
│ │ ○ v Click sets a X
│ │ ○ s Square has state
│ ├─╯
│ ○ qq Fix
│ ○ n Square is interactive
│ ○ ru Board() invokes Square()
╭─┤
│ ○ ym fix name: Square -> Board
│ ○ x WIP delete me
│ ○ yz LICENSE
│ ○ w A board full of X
├─╯
◆ kk 🔒 Displays X X **main**
│
~