Theme Push lost content from local dev theme

I am developing a custom theme on my local dev env using Shopify cli. If I make the content changes, setting changes, upload images, etc., via the provided link of the local theme editor and then do a Shopify theme push, none of those changes is reflected. I have just lost so much work due to this. Absolutely nonsensical. How is this not fixed yet? It is very hard to develop; I now have to go to the live theme, change theme settings there, then pull, do local changes, and push. Imagine if you forget where you made changes first. And then do pull/push - very prone to errors and various code conflicts that way. This is a critical bug, to be honest.

And yes, I do PULL first, make changes then PUSH.

Hi @Entropical , I usually have a separate dev theme, and make changes there, and then pull back locally. Basically it’s just a minute longer, but works for me. :slightly_smiling_face:

Hi Marina,

Thanks for the reply. Yes, I do this way too. However, I do some custom code changes locally + change things from the theme editor, too, e.g. adding sections and content, checking whether the custom sections that I’ve coded work and so on. If I make a change on the dev theme via a regular (not local) theme editor and then make changes in the code locally, then I can’t really do a Shopify theme pull because my code changes locally will be overwritten. Is it not?

Thanks, Vito

1 Like

I’ve found that once you’ve done a pull specifying a theme ID, then running:
shopify theme dev --store XXXX --theme XXXXXXX

Replacing the last part with the correct theme ID means your local code changes sync automatically in real time, You can then work as you anticipate. I suspect that if you later push, maybe json format settings from the Theme Editor are not syncing back, but in this workflow you only ever need to pull and use the dev mode, specifying theme ID in all cases.

I’m new to this workflow too, but this has been my experience after also having the same trouble initially.