Still uploading zipped .zip files every time you update your Shopify theme code?
Manually uploading zip files or editing code inside Shopify’s browser editor is a disaster waiting to happen:
- There is no change history or commit log.
- Two developers can overwrite each other’s edits with zero conflict warnings.
- Rolling back a broken deployment is stressful, slow, and error-prone.
Shopify’s native GitHub Integration connects your Git repository directly to your Shopify Theme library. Every commit pushed to your connected branch automatically syncs to the theme in seconds.
Here is how to set it up properly from scratch.
Prerequisites Before Connecting
- A GitHub account with access to the theme repository.
- A Shopify store where your staff/partner account has Themes read and write permissions.
- A properly structured Shopify theme repository (must contain directories like
/layout,/templates,/sections,/snippets,/assets,/config,/locales).
Step 1: Connect Your GitHub Account to Shopify
- In your Shopify Admin, go to Online Store → Themes.
- Scroll down to the Theme library section.
- Click the Add theme dropdown button.
- Select Connect from GitHub.
- If connecting for the first time, click Log in to GitHub.
- Authorize the Shopify Online Store GitHub App.
- You can choose to grant access to All repositories or Select repositories (recommended for security).
Step 2: Select Repository and Branch
Once authenticated:
- Choose your GitHub Account / Organization.
- Search and select your theme Repository.
- Select the specific Branch you want to sync:
- For your live production theme: connect to
mainorproduction. - For staging/testing: connect to a feature branch like
developorv2-redesign.
- For your live production theme: connect to
- Click Connect theme.
Shopify will pull the latest commit and add the theme to your Theme Library with a distinct GitHub branch icon.
Step 3: Understanding Bidirectional Synchronization
One of the most powerful features of Shopify’s GitHub integration is bidirectional syncing:
Git to Shopify (Code Changes)
When a developer commits and pushes code to GitHub:
git add .
git commit -m "feat: redesign product sticky buy bar"
git push origin main
Shopify’s webhook receives the push event and updates the theme files on Shopify within seconds.
Shopify to Git (Customizer & Merchant Settings)
When a merchant uses the visual theme customizer to reorder sections, upload images, or edit text:
- Shopify modifies
config/settings_data.jsonand JSON template files (e.g.,templates/index.json). - Shopify automatically creates a commit directly on your GitHub branch with a commit message such as:
Changes made by [Merchant Name] in Theme Customizer - Developers simply run
git pull origin mainin their local environment to get the merchant’s latest settings!
Best Practice Branching Strategy
To avoid breaking your live store, follow this workflow:
[ Feature Branches ] (e.g. feat/cart-drawer)
│
▼ (Pull Request & Code Review)
[ develop ] ──────► Connected to unpublished Staging Theme
│
▼ (Tested & Approved QA)
[ main ] ──────► Connected to Live Production Theme
- Staging Theme: Connect an unpublished theme to the
developbranch. Client reviews and QA happen here. - Production Theme: Connect your live published theme to
main. Merging PRs tomaininstantly updates the live site with zero downtime.
Common Errors & How to Fix Them
Error: “The repository must contain a valid theme directory structure”
Ensure your theme files are at the root of the repository, not nested inside a subfolder like my-theme/layout/theme.liquid. The root directory must contain config/settings_schema.json.
Error: “Merge Conflicts on settings_data.json”
If a developer edits settings locally while a merchant edits in the customizer simultaneously, a Git conflict can occur. Always run git pull before pushing local theme changes.
Summary
Connecting your Shopify theme to GitHub turns amateur zip uploads into a professional, version-controlled software delivery pipeline.
Need an automated CI/CD pipeline, headless Shopify Hydrogen setup, or custom Liquid theme engineering? Talk with the engineering team at Klickspell.