Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cloning a remote

Reset your progress

To reset your progress to the start of this chapter, run the following command:

curl https://s2p2.github.io/jj-for-everyone/reset.sh | bash -s clone
cd ~/jj-tutorial/repo

While we started this tutorial with jj git init, it's more common to begin by cloning a repository that already exists.

Let's simulate this by deleting our local repository.

cd ~
rm -rf ~/jj-tutorial/repo

And cloning it from the remote:

jj git clone ~/jj-tutorial/remote ~/jj-tutorial/repo

The jj git clone command takes a <source> and a <destination>. It also automatically sets up the source as a remote named origin.

Since this is a new local clone, re-apply the repo-specific authorship configuration:

cd ~/jj-tutorial/repo
jj config set --repo user.name "Alice"
jj config set --repo user.email "alice@local"
jj metaedit --update-author

Let's check with jj log:

@  upopmymm alice@local 2025-09-06 20:42:45 25716c6f
│  (empty) (no description set)
◆  ytwonzvp alice@local 2025-09-06 20:42:20 main git_head() 0a518bdd
│  Add project description to readme
~

The ~ symbol indicates that older, "uninteresting" commits are hidden by default. To view the entire history, use jj log --revisions 'all()' or jj log -r 'all()':

@  upopmymm alice@local 2025-09-06 20:42:45 25716c6f
│  (empty) (no description set)
◆  ytwonzvp alice@local 2025-09-06 20:42:20 main git_head() 0a518bdd
│  Add project description to readme
◆  psnzzpwy alice@local 2025-09-06 20:41:56 02181db9
│  Add readme with project title
◆  zzzzzzzz root() 00000000

Our repository was successfully restored from the remote.

You've completed Level 1! 🎉

You now know the essential skills for solo projects with backups.

Recap of the solo workflow:

  1. Make changes
  2. Create a new commit
  3. Move the bookmark
  4. Push to the remote

Practice this flow. When you're ready to learn about collaboration, continue to Level 2.