Skip to content

[Bug]: After force-pushing to GitHub, theme files got out of sync #1097

@vfonic

Description

@vfonic

Please confirm that you have:

  • Searched existing issues to see if your issue is a duplicate. (If you’ve found a duplicate issue, feel free to add additional information in a comment on it.)
  • Reproduced the issue in the latest CLI version.

In which of these areas are you experiencing a problem?

Theme

Expected behavior

I spent last several hours trying to figure this out. I forked Dawn theme from the GH repo. I was switching between v7.0.1 tag and main branch in the repo. I believe something broke when I force-pushed to my GH connected theme.

If I start the dev server with shopify theme dev, I get "old" settings_data.json. If I shopify theme pull, I get tons of changed files. I believe these files are from main branch, while now I'm on v7.0.1 tag. (It would be great to get another version released, it's been 4 months since the last version release)

I tried:

  1. Editing the JSON file locally (manually) so it syncs
  2. Editing and saving stuff in Theme Editor for development theme with shopify theme dev -e
  3. shopify theme pull - from the GH connected theme (not development theme, but the one in Shopify admin, connected to GH)

This last one pulls in "wrong" files.

Ok, so I think I finally figured out what's wrong. The GH connected theme in Shopify is not synced correctly because I force-pushed. Is there any way to fix this? This is really frustrating. I spent last several hours trying to figure out why the theme files are not being synced correctly, but it turns out that Dawn theme main branch and v7.0.1 tag have so many changes that the settings moved to a different place (from settings_data to section file) and now the easiest fix is to re-do all the modifications I did in the Theme Editor and delete the theme that's obviously not synced, even though in Shopify admin, it says:

05:34:28 PM: Received theme files from GitHub
05:34:28 PM: Files fetched
05:34:28 PM: 1 succeeded, 0 warnings, 0 failed
05:34:28 PM: Theme updated!

Let me know if you need any more details or anything else that I can do? I lost half of my day on this and would really appreciate if this bug would be fixed as this is not the first time that this happened to me.

Actual behavior

I'd expect git functionality to work as expected. Whatever files

Stack trace

No response

Reproduction steps

/

Operating System

macOS Ventura 13.1

Shopify CLI version (check your project's package.json if you're not sure)

3.33.0

Shell

No response

Node version (run node -v if you're not sure)

No response

What language and version are you using in your application?

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions