Work About Team Blog Tutorials FAQ
Book a discovery call → Chat on WhatsApp

Home / Blog / Shopify / How to Connect and Import a Shopify Theme from GitHub

ShopifyGitHubDevOpsVersion ControlLiquidTutorial

How to Connect and Import a Shopify Theme from GitHub

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

  1. A GitHub account with access to the theme repository.
  2. A Shopify store where your staff/partner account has Themes read and write permissions.
  3. 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

  1. In your Shopify Admin, go to Online Store → Themes.
  2. Scroll down to the Theme library section.
  3. Click the Add theme dropdown button.
  4. Select Connect from GitHub.
  5. If connecting for the first time, click Log in to GitHub.
  6. 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:

  1. Choose your GitHub Account / Organization.
  2. Search and select your theme Repository.
  3. Select the specific Branch you want to sync:
    • For your live production theme: connect to main or production.
    • For staging/testing: connect to a feature branch like develop or v2-redesign.
  4. 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.json and 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 main in 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
  1. Staging Theme: Connect an unpublished theme to the develop branch. Client reviews and QA happen here.
  2. Production Theme: Connect your live published theme to main. Merging PRs to main instantly 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.

Custom Shopify Engineering

Scaling a high-growth Shopify brand?
Skip fragile apps. Build custom Liquid.

We engineer custom Shopify themes, tailored sections, and high-converting store architectures for brands that refuse to compromise on design, speed, or autonomy.

Explore Custom Shopify Dev → Book Free 30-Min Call ↗

Keep Reading

Related Engineering Articles

GitHubHosting

How to Deploy Your Website to GitHub Pages for Free (2025/2026 Guide)

A complete step-by-step guide to hosting HTML/CSS/JS websites and modern single-page applications for free on GitHub Pages with custom domains and SSL.

5 min read Read →
GitGitHub

What is GitHub? Git vs. GitHub Explained for Developers & Non-Devs

A clear, beginner-friendly guide breaking down what GitHub is, how it differs from Git, why modern software teams rely on it, and essential concepts like commits, branches, and PRs.

5 min read Read →

Technical Blog

Explore all 50+ engineering tutorials

All Articles ↗

Looking for custom
Shopify engineering craft?

Let's build
your store right.

Book a free 30-minute call. We'll talk through your store goals, timeline, and budget.

Free 30-min call · Discuss scope & budget

Book your free call → Chat on WhatsApp

The craft in every click.