Navigating Shopify Theme Updates: How to Handle 'Rebase Failed' Conflicts

Ever hit that "Update theme" button on Shopify, only to be greeted by a cryptic error message like "Rebase failed with conflicts"? You’re definitely not alone. It’s a common head-scratcher for store owners who’ve invested time (or money!) in customizing their theme. We recently saw a fantastic discussion in the Shopify community about this very issue, with several experts weighing in to help a store owner named zhuk.

Let’s break down what’s really going on here and, more importantly, how you can fix it without losing your precious customizations.

Understanding the "Rebase Failed with Conflicts" Error

When zhuk tried to update their theme, they got an error detailing a "Rebase failed with conflicts" and a list of files like sections/blog-posts.liquid, sections/footer.liquid, and sections/header.liquid. This immediately raised two big questions:

  1. Does this mean my theme wasn’t updated?
  2. Does it mean all these listed files have custom code?

The short answers, as Moeed and Mateo-Penida from the community pointed out, are a resounding no to the first question, and a definite yes to the second!

Your Live Theme is Safe!

First and foremost, take a deep breath. When you see this error, your live, working theme is completely untouched. Shopify is smart enough not to break your current store. What actually happened is that a new, unpublished copy of the updated theme (e.g., "ThemeNameV2.6") was added to your theme library. This new copy has all the latest features and bug fixes from the theme developer, but the files listed in the error couldn’t be automatically updated.

Yes, Those Files Have Your Custom Code

The list of files in the error message — like your header, footer, or product recommendations — are precisely the ones where you (or a developer, or an app) have made custom code changes. The "conflict" arises because the theme developer also made changes to those same exact files in their update. Shopify can’t magically know which changes to keep — yours, the developer’s, or a combination — so it flags them for manual review.

Why This Happens (and Why It’s a Good Thing)

This conflict mechanism is actually a protective measure. Imagine if Shopify just overwrote your custom header code with the new theme’s header! All your hard work would be gone. By flagging conflicts, it ensures you have control over how your unique customizations are carried forward.

Your Action Plan: Merging Those Customizations Safely

So, you’ve got a new, updated theme copy, and your live theme is still running smoothly. Now it’s time to bring your custom code into the new version. Here’s a step-by-step guide, drawing from the community’s excellent advice:

Step 1: Don’t Delete Your Live Theme (Seriously!)

This is crucial. As Mateo-Penida and eva_greene emphasized, your current live theme is your safety net. It contains all your working customizations. Do NOT delete it until you’ve fully tested and published the new, merged theme.

Step 2: Identify Your Custom Code

You need to figure out exactly what changes you made in those conflicting files. Here are the best ways to do it:

  • The “Local Diff” Method (Recommended for Many Files): Moeed suggested this for zhuk’s 10 conflicting files.
    1. Go to Online Store > Themes.
    2. For both your live theme and the new updated copy (e.g., ThemeNameV2.6), click the three dots ... and select Download theme file. This will download them as zip files.
    3. Unzip both files and open them in a code editor like VS Code.
    4. Use VS Code’s built-in diff tool to compare each conflicting file (e.g., sections/header.liquid) between your live theme folder and the new theme folder. This will highlight every single difference.
  • Online Diff Tools (Good for Fewer Files or Quick Checks): Mateo-Penida recommended diffchecker.com. You can copy the content of a conflicting file from your live theme into one window, and the content of the same file from the new theme into another. It will visually show you the differences.
  • Manual Side-by-Side (If You Know Your Code Well): Open the conflicting file from your live theme in one browser tab (or code editor) and the same file from the new updated theme in another. Carefully go through your live theme’s code, looking for changes you know you made, and then manually apply those same changes to the new theme’s file.

A quick warning from Moeed: Don’t rely on the little "modified" dots you sometimes see in the Shopify code editor, especially after duplicating a theme. They can be unreliable. A proper diff tool is your source of truth.

Step 3: The Merge – Copy Your Custom Bits

Once you’ve identified your custom code in each conflicting file, carefully copy only your custom bits into the corresponding file in the new theme copy. Be precise! You want to integrate your changes without breaking the new theme’s updated structure or features. This is where the diff tools shine, helping you see exactly what to move.

Step 4: Test, Test, Test!

This step cannot be overstated. After merging your custom code into the new theme copy, you must preview it thoroughly. Moeed rightly pointed out that 10 conflicting files, especially ones like header, footer, and search, make this a significant merge job. Test everything that was listed in the conflict, plus any other critical areas of your store:

  • The header and navigation
  • The footer
  • Product pages, especially recommendations
  • Collection pages
  • Blog posts
  • Contact forms
  • Search functionality
  • Any custom sections or apps you’ve integrated

Click through your entire customer journey. Make sure everything looks right and functions perfectly.

Step 5: Go Live!

Once you’re absolutely confident that the new theme copy with your merged customizations is working flawlessly, you can finally publish it from your Shopify admin. Congratulations, your store is now running on the latest, greatest version of your theme, complete with all your unique touches!

When to Call for Backup

If you find yourself with a long list of conflicting files, especially crucial ones like the header or footer, it can become a complex and time-consuming task. As Moeed mentioned, it’s easy to half-fix something and introduce subtle bugs that only appear later. If you’re not comfortable diving deep into code, or if the sheer number of conflicts feels overwhelming, don’t hesitate to reach out to a Shopify developer. They can handle the merge for you, ensuring a smooth and error-free transition. It’s an investment in your store’s stability and future.

Share:

Use cases

Explore use cases

Agencies, store owners, enterprise — find the migration path that fits.

Explore use cases