Search code examples
shopifyshopify-template

Shopify - Best Practices to have the Theme Git repository and Live Shopify Site files in sync


We have several people making changes to the Theme in terms of its content, styles, liquid files. After I have pushed my latest code to git and uploaded theme to site. How do I keep a track of any changes been made on the site and avoid overwrites when doing theme uploads:

  1. Is content, styles and images stored in Shopify DB ?
  2. What if someone makes changes to a liquid file on the LIVE Site and I am unaware of those changes ?

  3. What is the recommended development flow when working with Shopify Theme with regards to keeping it in sync. I am aware there are APPS which trigger git commits when changes made to LIQUID files.

Standard practices and suggestions please !


Solution

  • There are several well written articles on Shopify website that defines different ways to organize your workflows. 2 main tools provided by Shopify are

    1. ThemeKit
    2. Slate

    Slate is in low maintenance mode for now.

    ThemeKit works pretty well and you can read about that at Setting up ThemeKit

    A detailed guide about using Git to simplifying Shopify development Workflow

    For automatic deployments from git to your Shopify store , you can use Deploybot. Few details about setting up Deploybot with Shopify

    Regarding data Shopify stores compiled liquid files and images on its own cdn while the theme customizer data is stored inside config folder in file named settings_data.json so do not push that file into git.

    For multiple developers working on the same site, you can use different themes configured with ThemeKit and make use of Theme Preview feature to see changes on frontend.

    It is never easy to track 2 way changes. So it is better to use your git repository as signle source of truth and do not modify code on Shopify website.

    You may also have a look at Motifmate Toolbox that is a 3rd party solution for theme development.