Skip to main content

Rolling Back a Deploy

Theme Deploy deploys whatever is at the HEAD of your branch, so rolling back is done through Git — you revert the code, and Theme Deploy redeploys it.

The safest rollback is a git revert, which creates a new commit undoing the bad change:

git checkout main
git revert <bad-commit-sha>
git push origin main

The push triggers a new deployment automatically, restoring your live theme to the previous state. Your Git history stays intact.

Option 2: Reset the branch

If you prefer to rewrite history (e.g. on a preview branch):

git checkout main
git reset --hard <last-good-commit-sha>
git push --force origin main
caution

Force-pushing rewrites shared history. Prefer git revert on production branches, especially in a team.

Option 3: Redeploy from the dashboard

The sync button on any dashboard row re-deploys that branch at its current HEAD. This is useful when a deployment failed for a transient reason (or after you've reverted on GitHub), but note that it does not deploy an older commit — it always deploys the latest state of the branch.

Emergency: publish a different theme manually

If you need your store fixed immediately, you can bypass Theme Deploy entirely: in your Shopify admin, go to Online Store → Themes and publish a known-good theme (for example, a previous [TD] preview theme or a backup). Then perform the Git rollback calmly and re-enable your normal flow.

Prevention

Keep auto-publish off until changes have been reviewed on a preview theme, and consider the Team plan's selected-branches mode so only vetted branches deploy.