Version Control in Miva Merchant#
Version control in Miva Merchant allows developers and administrators to manage changes to their store templates and content in a controlled environment. By leveraging Branching and Template Version History, users can safely test updates, preview changes, and roll back to previous versions without impacting the live site.
Branching: A Controlled Sandbox#
Branching allows users to make changes to their website in a sandbox environment, ensuring that the live site (primary branch) remains undisturbed. Each branch serves as a copy of the current site, enabling developers and store owners to test updates, create new pages or layouts, and fine-tune their designs before merging them into the primary branch.
Managing Branches#
Creating a Branch#
When creating a branch, you are duplicating an existing site configuration as a starting point. This new branch becomes an isolated environment where changes can be made safely without affecting the primary branch.
Steps to Create a Branch:
- Navigate to User Interface > Templates in the Miva admin.
- Click the Branch Status Box in the upper left corner.
- Select Create New Branch from the slideout menu.
- Choose a name, color, and the branch to copy as a starting point.
- Click Create.
Benefits of Branching:
- Isolate changes for safe testing.
- Experiment with new features or layouts without risk to the live site.
- Allow multiple developers to work on different features simultaneously.
Merge#
Merging in Miva allows you to selectively combine changesets from a branch into another branch, typically the primary (live) branch. Only the changesets explicitly selected during the merge process will be applied.
Steps to Merge Changesets:
- Open the Branch Controls Menu from the Branch Status Box.
- Select Merge and choose the target branch (e.g., the primary branch).
- Select the changesets you want to merge from the batchlist.
- Add a description for the merge to document the updates.
- Confirm the merge to apply the selected changes.
Key Points:
- Selective Updates: Merging only applies the changesets selected during the process.
- Incremental Changes: Merge smaller changesets to reduce risk and simplify testing.
- Preview Before Merge: Always use the preview tool to verify that the updates are correct.
Copy#
The copy feature allows you to replicate an entire branch’s history up to a specific changeset. This includes all changesets from the starting branch up to the selected point, making it a powerful tool for creating a complete branch copy for further development.
Steps to Copy a Branch:
- Open the Branch Controls Menu from the Branch Status Box.
- Select Copy and choose the branch to copy from.
- Specify the changeset up to which you want to copy.
- Create a new branch based on the copied changes.
Key Points:
- Full History: Copying brings over all changesets from the original branch up to the selected changeset.
- Ideal for Development: Use this feature when you need a complete working version of a branch for further development.
Template Version History#
Miva Merchant provides Template Version History, allowing users to track changes to individual templates over time. This feature complements branching by enabling granular control over specific templates.
Key Features
- Automatic Versioning:
- Every time a template is saved, a new version is created.
- Users can view a list of previous versions for each template.
- Revert to Previous Versions:
- Easily restore a template to a previous state.
- Version Details:
- Includes timestamps, author information, and a diff view to highlight changes.
How to Use#
- Navigate to the desired template in the admin interface.
- Click the Version History icon to view a list of saved versions.
- Select a version to preview changes or revert.
Best Practices#
- Use Branches for Major Updates:
- Create branches for significant changes, such as redesigns or new features, to minimize risks.
- Leverage Preview and Merge Tools:
- Always preview changes before merging them into the primary branch.
- Understand Copy vs. Merge:
- Use Copy to replicate an entire branch’s history.
- Use Merge to selectively apply specific changesets.
- Organize Branches Clearly:
- Use descriptive names for branches (e.g.,
HolidayPromo2025
) and delete unused branches regularly.
- Use descriptive names for branches (e.g.,
- Document Changes:
- Maintain clear notes for each branch and changeset to aid in troubleshooting and future updates.
Summary#
Version control in Miva Merchant, encompassing both Branching and Template Version History, empowers developers and administrators to manage changes effectively and safely. By using these tools, you can experiment, refine, and implement updates with confidence, ensuring a seamless user experience on your live site.
Key Takeaways
- Branches provide a sandbox environment for testing and experimentation.
- Merging selectively applies chosen changesets to the target branch.
- Copying replicates all changesets up to a selected changeset, creating a full branch history.
- Template Version History ensures granular tracking and rollback of template changes.