Created by potrace 1.16, written by Peter Selinger 2001-2019

Miva Developer Docs


The everyday MMT loop is: pull the latest changes, edit, check what you changed, then push. Doing it in that order matters, because push doesn’t check for other people’s changes.

mmt pull
# edit files
mmt status
mmt diff
mmt push -n "What you changed"

Why pull comes first#

mmt push sends your version of every file you changed and doesn’t compare it with the server. If someone else changed the same template since your last pull, push replaces their version with yours, without a warning. Objects you didn’t change aren’t touched.

mmt pull does compare. For each file:

Your file On the server since your last pull What pull does
Unchanged Changed Updates your file
Changed Unchanged Keeps your changes
Changed Changed Stops and lists the files, so you can decide
Any Deleted Deletes your file, even if you changed it

When pull stops on a conflict, compare your copy with theirs (for example, copy your file aside, run mmt pull --force on it, and merge by hand), then push the result.

Working as a team#

  • Each developer has their own checkout and their own credential. Use SSH credentials if you want each changeset to show who made it.
  • Pull before you start and again right before you push.
  • Push small, focused changesets with clear notes. mmt log shows the history.
  • Keep everyone on the same MMT version.

Using Git with MMT#

A checkout folder can be a Git repository too: commit your template files to Git and use MMT to sync them with the branch.

  • Add .mmt/ to .gitignore. It holds the checkout’s state for your machine only.
  • Never commit ~/.mmt/config.json; it has your credentials in plain text.
  • After switching Git branches or pulling from Git, run mmt status to see what now differs from the template branch before you push.

Undoing changes#

  • mmt revert puts files back to the version you last checked out or pulled.
  • To undo a change that’s already pushed, check out the earlier changeset into another folder with mmt checkout -c <changeset>, copy the file back into your checkout, and push it.

What push can’t do#

Push changes objects that already exist on the branch. It can’t create new templates, properties or resources (new files you add are ignored), delete objects, or change a resource’s code or type. Do those in the admin, then pull.