Version Branching

Introduction to Branches

Branches are a way for store owners and developers to make changes to a website, in a controlled, “sandbox” environment, so their live website remains undisturbed and available to shoppers. They are also a useful way to create new pages or layouts and test them before they go live on your store’s production site.

Branching Changes in Miva

Branching was first introduced in Miva version 10, primarily as a tool for developers, and subsequent updates to the Miva admin expanded those capabilities. Branching capabilities were further enhanced with version 10.05, alongside the release of PageBuilder. With the release of 10.08, the use of Branching and Branches was expanded further.

Note

For additional details on Branching, in particular its use with PageBuilder visit the Template Branch Preview document.

What's New in 10.08

With the release of version 10.08, released in October 2023, the Miva admin added even more functionality to Branching. For additional information on this release, visit the 10.08 Release Notes page.

In this guide you will learn:

Why Branches are Important

Template Branches were first introduced in Miva release 10.05, alongside PageBuilder. The new functionality made using PageBuilder easier because you could create new webpages, modules and marketing campaigns, for example, without impacting your store’s existing web presence. The work is done on a branch of your existing site, and when complete, the changes are then merged to your site.

It can be used by store owners who take a more active role in maintaining their web presence, and by developers who are helping to create websites for store owners.

Branches Concepts

The terms used in Miva Version Branching are similar to what developers use around “code repositories.” They will be instantly familiar to developers, but here’s an intro to the terminology to demystify it for marketers and store owners.

These developer-like features provide marketers and store owners with a robust way to safely develop content in a controlled environment, enabling them to make informed decisions on how and when to present it to customers. It's like having a playground for your content where you can experiment and fine-tune before sharing it with your audience.

How To Create a New Branch

To create a new branch, follow these steps:

1. From the Miva admin home page, click the User Interface header on the left side of the page.

2. Click the Branch Status Box in the upper left corner.

3. In the slideout that opens, click Create New Branch.

4. In the box that opens, select a color to correspond to the branch, and give it a name.

5. Choose the existing branch you want to copy.

6. Click Create.

Note

Creating a template branch creates a new "copy" of your website, with all of the page templates. It does not include things like products, or payment or shipping settings. You can create an unlimited number of template branches.

Previewing a Branch

You can preview the current branch you are working on by clicking on the eye icon (upper right corner of the admin).

A preview widget appears in the bottom left corner of your window. The widget allows you to:

To Preview a Branch at a Future Time

1. Click the Edit link in the widget pop out.

2. Select a Date and Time and click Done.

How To Push a Branch Live

To push a branch live to your website, follow these steps:

1. Click the three dots icon immediately below the Branch Status Box to open the Branch Controls Menu.

2. In the dropdown, select Merge.

3. In the dialog box that opens, select the Primary branch for your website.

4. Select the changes from the batchlist you want to merge to your site.

5. Click Continue.

6. Add a note about what was changed.

7. Verify the changesets you want to merge, then click Merge Changeset(s).

How To Roll Back Changes if Needed

The History function allows you to roll back changes you have made. To roll back a change, follow these steps:

1. Click the three dots icon immediately below the Branch Status Box to open the Branch Controls Menu.

2. In the dropdown, select History.

3. In the dialog box that opens, select the changeset you wish to revert the site back to.

4. Click Revert to Changset.

5. In the dialog box that opens, click Revert.

FAQ

Do changes to JS and CSS in one branch impact another?

No, that’s one of the benefits of using branches. Because branches are local, rather than global in nature, you can make drastic changes in a branch and there is no impact to your production website. 

If I add or delete a page in one branch does that impact all branches?

No, for the same reasons noted in the previous answer. 

What if I install a module on one branch?

As noted above, most changes to branches are made locally, within the branch you're working on, not globally across all branches. However, modules are still installed and uninstalled globally, which can create issues. If there are any items on page templates added by a module, they will only be available on the working branch. With modules, you have the option to remove all references to items and pages on every branch when uninstalled, known as a hard delete, or leave them in place, known as a soft delete.

How many branches can I have?

Theoretically, you can have as many branches as desired. However, a best practice is to keep things tidy and delete old or unused branches. Too many branches could negatively impact update performance.

How can branches be used to organize changes over time?

Because branches give you a place to iterate without impact to your production site, when you create updates to your site, you can name/number them accordingly. For example, if you create a new branch to your main production site, you can name it Version 1.1. The next iteration can be Version 1.2 and so on. A complete overhaul to your site could be named Version 2.0. This provides a way to see how your site has evolved.

Looking for Developer Docs?

We have a whole section for that, including: Developer Training Series, Template Language docs, Module Development tutorials and much, much more.

Head to the Developer Section

This website uses cookies to identify visitors, track visitors to our website, store login session information and to remember your user preferences. By continuing to use this site you agree to our use of cookies. Learn More.

This website uses cookies. By continuing to use this site you agree to our use of cookies. Learn More.

Accept

Copyright © 1997 – 2021 Miva©, Miva Merchant©, MivaPay©, MivaCon© Miva, Inc. All Rights Reserved.