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

Every Repo is a Remote

Important

You see how your local Git repository is a pseudo-remote.

Jujutsu favors consistency: a minimal bunch of building blocks that compose well together. This applies to remotes, too.

Git treats the local repository and remotes very differently. Jujutsu simplifies this: everything is a remote. Imagine your Jujutsu workspace connects to a collection of remote repositories. Your local Git repo is just one of them, named git. You have origin on Codeberg? Similarly, you have git hosted locally on your disk.

Keep this mental model: it helps understand why branches display as my-branch@origin or my-branch@git.

Pseudo-remote

Actually, I lied a bit.

The git repository is more a pseudo-remote than a true one. For example, you cannot fetch from or push to it. Jujutsu treats it with privilege, keeping it updated in real-time. You can imagine that it runs git fetch and git push automatically on every command you execute.1

So, don’t take this literally; just use it as a mental model. It helps reasoning.


  1. For correctness: to sync with the git pseudo-remote, instead of fetch and push Jujutsu uses jj git import and jj git export. You will rarely need them, though.