Keep unlimited layout history on GitHub
The app keeps the newest 25 versions of every email layout. Connect GitHub and every version is also saved to a repository you choose, so your layout history is unlimited: see who changed what, restore any version, and keep a copy of your layouts outside the app.
Connect GitHub
- In the app, open Developer and the Connections tab.
- Under GitHub, click Connect GitHub. GitHub opens in a new tab.
- Install the app on your GitHub account or organization and choose which repositories it may use. A private repository is recommended. If you do not have one yet, create it first on github.com/new.
- Back in the app, pick the repository under Repository and click Use this repository.
The app writes every layout you already have to the repository right away, then commits each new version as you save.
What is in the repository
One file per layout in the email-layouts folder, named by the layout's id, for example email-layouts/cmu3010yo01e4yn0wdjmh7xab.json. It holds the layout's name, subject, preview text, content or visual design, and every translation. Each save in the app, through the API, by AI or by a restore is one commit with a message such as Update "Order confirmation" (editor, v12).
Deleting a layout in the app deletes its file; the earlier commits keep its history.
Restore an older version
Open the layout and click Version history. Below the newest versions kept in the app, Older versions on GitHub lists every commit of the layout. Click View to preview one and Restore this version to put it back. The restore is saved as a new version, so it can be undone.
Edit a layout in GitHub
Change a layout's file in the repository and commit it to the connected branch: the app updates the layout within seconds. The file is checked like a save in the app: Liquid must be valid, links and colors must be safe and files must be uploaded to your store. A file that fails the check is ignored and the layout stays as it was.
A file cannot create a new layout, and deleting a file does not delete a layout, so a mistaken commit never breaks an email that is sending.
Disconnect
Developer > Connections > GitHub > Disconnect GitHub removes the connection and the app's access. The repository and its history stay in your GitHub account.
Through the API
GET /api/v1/email-templates/:id/versions/github lists the versions on GitHub, and POST /api/v1/email-templates/:id/versions/github/:sha/restore restores one. The MCP tools are list_template_versions with github: true and restore_template_github_version.

