Skip to content

Version Branching#


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 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.

Overview#

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.

  • There can be many “branches” of the current store, only one of which is the primary branch. That’s the one that customers experience.
  • You create a branch by “copying” another branch as the starting point.
  • You can see a “history” of every change made within a branch, and “revert” back to any previous version.
  • You can “merge” changes from one branch into another.
  • You can “copy” items from one branch into another.

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.

Create a 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.

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: Switch between branches.

Preview your site at future date or time. This can be helpful, for example, if you are working on an updated Storefront page for the holiday season, or if you have scheduled components within PageBuilder to go live on certain dates.

Preview Future Time#

  1. Click the Edit link in the widget pop out.
  2. Select a Date and Time and click Done.

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).

Roll Back Changes#

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.