Mesa versions every document with robust version control. The model is based on Jujutsu VCS which allows for full Git-compatibility while enabling more efficient agent-first workflows.Documentation Index
Fetch the complete documentation index at: https://docs.mesa.dev/llms.txt
Use this file to discover all available pages before exploring further.
Core Primitives
Repository
A repository on Mesa is essentially just a folder that has its own version history and permissions. As the documents are modified in a repository the version history is updated and you can easily undo, redo, and modify this history as you please while never losing work.Changes
The core primitive of Mesa’s version control is theChange. Think of a change as a logical unit of work or logical modification to your repository. Each change has a unique identifier, a message/description,
and can contain anywhere from zero edited files to many edited files.
An example of the change history for a simple repository that scaffolds an internal dashboard and adds a forecast widget might look like this:
base_change_id. The message serves as the change description.
When you mount the virtual filesystem, your first write automatically goes into a
new change on top of the change/bookmark you targeted to keep you safe from accidental overwrites. Moving the bookmark
is the typical way to accept those writes once you’re ready. See Writing to a Mount for more details.
Bookmarks
Git is very focused on branches but JJ uses lightweight bookmarks instead. A bookmark just a lightweight pointer to a specific change in the change DAG which allows you to use reference that change more easily. Almost any of our APIs where you can reference a change you can pass in either the change id or an associated bookmark. Bookmarks are mutable and can be moved from one change to another. Every repository on mesa has a default bookmark, usually calledmain although this is configurable when creating a repository. If cloned from an upstream like GitHub we will use the default branch as the default bookmark.
puqltutt change and the feature/widget bookmark pointing to the qzvqqupx change.
Create a bookmark at a given change and move it onto a newer change later:
Conflicts
Conflicts work exactly how they do in JJ. This is mostly the same as Git with the sole exception that conflicts are non-blocking. A change can be in a conflicted state and you can resolve the conflicts later or in some cases ignore them entirely. This prevents your agents from getting stuck and gives you maximum flexibility in how to handle conflicts. A conflict occurs when you’ve modified the same part of the same file in different ways on two separate branches and then try to merge them. We have multiple ways to resolve them. See dealing with conflicts for more details.Dealing with conflicts
Mesa beta doesn’t currently have APIs for conflict resolution. These are coming in the next week.
overview.json and change the title property:
Before any merge
Both Chat A and Chat B have edited overview.json in the same place.
feature/chat-a into main Mesa will return an error because the new merge commit would be conflicted.
Because conflicts are non-blocking, a merge can produce a conflicted change that you resolve later. The conflicted state would look like this:
feature/chat-a bookmark still points to qzvqqupx (branched from original main change ovknlmro), while the conflicted merge change zxoosnnp combines both parents (qzvqqupx and puqltutt).
We will be adding more granular, line and hunk-based conflict resolution as well as powerful APIs for agents to resolve conflicts automatically.
Comparing to Git and JJ
Mesa is Jujutsu-based while retaining full Git compatibility. You can essentially treat changes like commits and bookmarks like branches but there are some key differences:- There’s no staging area like in Git. You are always editing an existing change and changes can evolve as you edit them. When you create a new change in Mesa it is initially empty and then you can edit and modify files at that change. This is ideal for agents running in sandboxes because any edits they make are automatically persisted to a very specific place in the version tree rather than being saved in some dangling staging area.
-
Bookmarks are like branches in git but lighter weight. They do not automatically move from one change to another but can be moved manually. The consequence of this is that you do not need to explicitly think about
branching ahead of time. If you have a
mainbookmark, you can just create a new change from it and that’s effectively an unnamed branch. You can name it later or leave it unnamed and create new changes on top of it or just move the main bookmark to point at the new change.
| Mesa Concept | Git | JJ |
|---|---|---|
| Repo | Repo | Repo |
| Change | Commit | Change |
| Bookmark | ~Branch | Bookmark |
Syncing to GitHub & GitLab
Mesa can sync with arbitrary upstream git repositories including ones hosted on GitHub or GitLab. This is useful if you want to create a Mesa repository based on a template repo that lives in GitHub or use Mesa mounts as a faster way to access a GitHub-hosted repo. Add an upstream to a Mesa repository, then trigger a sync viasyncUpstream in the SDK or the upstream syncs REST API. See GitHub Sync for setup, auth options, and sync observability.

