Best practice for GitHub-managed theme across 3 stores with independent customization (JSON)

Hi, I’m working on a Shopify setup that involves three stores within the same organization, each using a very similar codebase (~90% shared). Until recently, we used global shop.metafields conditions in Liquid to render different content per store – everything lived in a single shared GitHub branch connected to all stores.

Now we’ve started building editable sections and layouts using theme customization, and we’ve run into a serious problem.

When one store (say, EU) makes a customization via the theme editor (e.g. adds a product slider, sets custom collections/titles), Shopify’s bot commits and pushes that JSON to the connected GitHub branch – which then propagates those settings to all other stores, even if the content is store-specific or shouldn’t be visible at all on other markets.

Proposed setup:

  • One shared branch (dev) for development of Liquid sections and styles.
  • Three separate branches:
    • store-us-custom
    • store-eu-custom
    • store-pro-custom

Each store connects its GitHub integration to its own branch, where Shopify pushes its own settings_data.json, templates/*.json, etc.

In dev, we add all customization files to .gitignore to:

  • allow pulling CMS data from a store (e.g. git checkout store-eu-custom – templates/index.json) to preview content and test design,
  • but prevent accidental commits of JSON back to the other stores during merges.

What do you think? Maybe there better/cleaner ways to manage this setup across multiple stores from a single repo?

I maintain a main and staging branch which contains all the theme files, but then each store has its own main and staging branches, e.g.

  • uk-main
  • uk-staging
  • usa-main
  • uk-staging

Then I use either Buddy or Github Actions to just push from main or staging into each store branch. And for each one, I pull the content/settings from the store so I have the latest changes, then do an entire shopify theme push back in so it has all the latest dev changes.

All the store branches are connected via Github so they track the content/setting changes per store.

Would this community built tool help @lynthius GitHub - TheBeyondGroup/shopkeeper: A CLI for managing settings and deployments of Shopify store themes.

1 Like

Thanks @Luke, and @Liam-Shopify! I ended up using GitHub Actions to automate the branch merges and built a workflow very similar to the one Luke shared. That tool looks great - I’ll definitely give it a try!

1 Like