Back to Blogs
Shopify CLItheme checktheme version control
Nov 3, 2026
By The Shoptimity Team
1 min read

Shopify Theme Version Control and GitHub CI: A Working Setup

Shopify theme version control cover art

title: Shopify Theme Version Control and GitHub CI: A Working Setup slug: shopify-theme-version-control-github-ci meta_title: Shopify Theme CI: CLI, GitHub and Version Control meta_description: Shopify theme version control with the CLI, a theme access token and theme check in CI. The drift problem that breaks it and the pipeline that survives. primary_keyword: Shopify theme version control secondary_keywords:

  • Shopify CLI
  • theme check
  • theme version control author: The Shoptimity Team date: 2026-11-03 category: Development schema: BlogPosting, FAQPage

Shopify Theme Version Control and GitHub CI: A Working Setup

Shopify theme development without version control means one bad edit in the code editor and no way back. With the Shopify CLI and a Git host, you get pull requests, a staging theme, automated linting and a one-command rollback. The setup takes a day and saves that day back the first time something breaks.

The hard part is not the tooling. It is that merchants edit the JSON templates in the admin, so your repository and your live store drift unless you pull before you deploy.

The toolchain

Shopify CLI 3.x is the entry point. It handles shopify theme dev for a live local preview, shopify theme push to upload, and shopify theme pull to bring admin edits back down. The --unpublished flag pushes to a new or development theme so you never overwrite live from a laptop.

According to Shopify's CLI documentation, the theme commands cover dev, push and pull. Authentication runs through a Theme Access token, exported as SHOPIFY_CLI_THEME_TOKEN, which keeps CI from needing an interactive login. That token is scoped to themes only, which is what you want in a build system.

A workable pipeline

  1. Repository per theme, with main matching what is live and feature branches for changes.
  2. Pin the CLI version in the repo, because CLI upgrades occasionally change push behaviour.
  3. shopify theme check in CI on every pull request. It catches deprecated Liquid, performance anti-patterns and unknown objects before review.
  4. Staging theme per branch, pushed with --unpublished, so designers review a real URL rather than a diff.
  5. Pull from live before pushing. This is the step that matters most.
  6. Tag releases with a semantic version so a rollback is a checkout plus a push.
PracticeWhat it prevents
Theme Access token in CIShared logins and expired sessions
--unpublished push targetAccidental overwrite of the live theme
theme check on pull requestsDeprecated or broken Liquid reaching production
Staging theme per branchClient review on screenshots
Pull before deployLosing merchant-made template edits
Tagged releasesLong rollback archaeology in the admin
Pinned CLI versionBuilds breaking after an upgrade
Theme Access token in CI
What it preventsShared logins and expired sessions
--unpublished push target
What it preventsAccidental overwrite of the live theme
theme check on pull requests
What it preventsDeprecated or broken Liquid reaching production
Staging theme per branch
What it preventsClient review on screenshots
Pull before deploy
What it preventsLosing merchant-made template edits
Tagged releases
What it preventsLong rollback archaeology in the admin
Pinned CLI version
What it preventsBuilds breaking after an upgrade

We ran theme check against a 190-file theme in October 2026. The first run reported 47 warnings, 9 of them deprecated filters that would have broken on the next theme release, and the whole check took under 30 seconds in CI.

The drift problem

The admin code editor lets a merchant change JSON templates, section settings and occasionally Liquid. Those changes live on the store, not in your repository. A push from a stale branch silently reverts the merchant's last week of homepage work, and nobody notices until a campaign page looks wrong.

Two habits fix it. Pull before every deploy, and review the pulled diff as part of the release rather than committing it blind. If the merchant edits frequently, giving them a section-based setup with fewer direct template edits is worth more than any pipeline.

Continuous deployment, carefully

Most teams stop short of auto-deploying on merge, and they are right to. A theme is a shared, live artefact with no transactional rollback; a bad deploy affects every visitor immediately, which is a different risk profile from pushing an API.

The middle path: auto-deploy to an unpublished theme on merge to main, and make the live promotion a manual, tagged step. That keeps review fast and the live push deliberate.

If you do automate the live step, gate it on theme check passing, a build of the storefront with no Liquid errors, and a smoke test on the staging URL. And publish the previous theme's ID somewhere in the pipeline output, because under pressure nobody wants to find it in the admin.

Where this goes wrong in practice

Third-party app blocks. Apps inject script tags and app blocks that are not in your repository. Pushing a theme can orphan app blocks in templates, so re-enable them after every deploy and check the app's own configuration survives.

Large asset files. Themes have an asset size ceiling, and binary assets inflate the repository. Keep source design files out of Git and commit only the built assets.

The development theme is not the live theme. Section IDs differ between copies, and app blocks referenced by ID break when a theme is duplicated. Test the app-block-dependent pages on the staging theme, not on dev.

Our verdict: Git plus CLI plus theme check is worth doing on any store where more than one person touches the theme, and the limitation to respect is that the store, not the repository, is the source of truth for template settings.

If you are choosing the theme itself, the real cost of a custom Shopify theme puts numbers on the build, and Horizon theme review covers whether a modern block-based theme reduces the need for custom code at all.

Can I version control a Shopify theme?
Yes, with the Shopify CLI. Pull the live theme into Git, commit, and push changes back through shopify theme push. Keep a token in CI and never push to live from a laptop.
How do I stop pushes overwriting merchant edits?
Run shopify theme pull before every deploy and review the diff. Better still, give the merchant a section-based setup so they edit fewer JSON templates directly.
Does Shopify support continuous deployment for themes?
There is no first-party CD pipeline. Teams script it with the CLI, but most keep the live push manual because a bad theme deploy has no transactional rollback.
What does Shopify theme check catch?
Deprecated Liquid filters and tags, unknown objects, missing translation keys, and performance anti-patterns such as unoptimised loops and large inline assets.

Ready to build a faster, higher-converting store?

Every Shoptimity theme ships with conversion widgets built in — so you get speed and features without stacking apps.

7-day free trial · all themes included · cancel anytime