Mod
Browse the docs · Version control
docs / history

Version control

Mod keeps two kinds of history and never mixes them. Documents, sessions and projects keep every change on the log, with who made it. Code keeps its history in git, and each session works on its own branch.

Mod decides

  • Every change to a document is kept, attributed to a person or an agent, and any earlier state can be read back.
  • A named version is a marker on that history. Restoring one writes a new change on top, so nothing is lost by going back.
  • A session that changes code gets its own branch, mod/session/<id>, off the base it started from.
  • A commit, a merge or a push is a command on the log, so the session shows when and why it happened.
  • Two agents in one document merge per character. Two agents in one repository merge per commit, through git.

You decide

  • When to name a version, and what to call it.
  • Your git host, your base branch and who may merge.
  • Whether an agent may push, or only open a review.

Why it is fixed. An agent that can undo nothing is an agent you cannot let work alone. Keeping every change is what makes it safe to say yes.