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

Miva Developer Docs


This walkthrough downloads a branch, changes one file and pushes the change back. It uses a credential named mystore from Set up credentials.

Work on a branch other than the live one. Create one in the admin or with mmt branch create, then preview it before you merge.

1. Find your branch#

mmt branch list -c mystore -s YOUR_STORE_CODE
Branch: Development
    Is Primary: False
    Is Working: True
    Preview URL: https://www.example.com/...

Branch: Production
    Is Primary: True
    Is Working: False
    Preview URL: https://www.example.com/...

If this fails with Access denied, check the token’s permissions and allowed IP addresses. See Troubleshooting.

2. Add a remote#

A remote names a credential, store and branch together:

mmt remote add -c mystore -s YOUR_STORE_CODE -b Development mystore-dev

3. Check out the branch#

mmt checkout mystore-dev ./mystore-dev
cd mystore-dev

Checkout prints nothing when it works. The folder now holds templates, properties, js, css and resourcegroups folders, plus a .mmt folder where MMT tracks the checkout. Checkout folder layout explains each one.

4. Change a file#

Edit a template, for example templates/sfnt.mvt (the storefront page). Then see what changed:

mmt status
templates/sfnt.mvt

To compare your version with the branch’s, set a diff tool once and use mmt diff:

mmt config set diff -- code --diff --wait
mmt diff templates/sfnt.mvt

5. Push the change#

mmt push -n "Add a banner to the storefront"
Committed the following files:
    templates/sfnt.mvt

The change is now a changeset on the Development branch. Open the branch’s preview URL to see it, and use mmt log to see the branch’s history.

Run commands from the checkout root#

push, pull, diff, revert, tag, switch and sri work on the current folder, so run them from the checkout’s top folder (the one with .mmt in it). File names you give them are relative to that folder, such as templates/sfnt.mvt, using \ instead of / on Windows.

Next steps#