Commits your modified files to the branch as a new changeset. Run it from the root of a checkout (the folder that contains .mmt). File names are relative to that folder; on Windows use backslashes (templates\sfnt.mvt), because a path with forward slashes doesn’t match and is silently ignored.
Before you begin#
- Give commit notes with
--notes, or set an editor so MMT can open one for you. - Run
mmt pullfirst. Push doesn’t check whether someone else changed the same files on the server, so it overwrites their changes without warning. Pull does check.
Usage#
mmt push [--notes NOTES] [filepaths ...]
Arguments#
| Argument | Short | Required | Description |
|---|---|---|---|
--notes NOTES |
-n |
No | Notes describing the changes to be committed. |
filepaths ... |
No | The list of local files to commit and push. If blank, all locally modified files will be committed. |
Examples#
Push every modified file:
mmt push -n "Update the storefront header"
Push only two files:
mmt push -n "Fix product page price" templates/prod.mvt templates/prod.json
What push does#
- Finds files that changed since the last checkout, pull or push. If there are none, it prints
No files to commit. - Builds one change per Miva object. A template’s
.mvtand.json, or a resource’s.jsonand.js, go together. - Creates a changeset on the branch with your notes and the checkout’s tags.
- Prints
Committed the following files:and the list.
Without --notes, MMT opens your editor on a temporary file. Lines starting with # are ignored, and the remaining lines are joined into one line of notes. Empty notes cancel the push (Aborting commit due to empty commit notes).
Things push can’t do#
- Add or delete objects. Only files MMT checked out are pushed; new files you create are ignored. Deleting a tracked file pushes it as empty instead of deleting the object.
- Change a resource’s code or type. Those keys in a resource’s
.jsonare read but not sent.
An empty or deleted settings .json clears that template’s or property’s settings, and MMT deletes the local file after the push.