With the arrival of Shopify 2.0, it’s now thrown my development workflow out of the window. The `config.yml` made development much more manageable when working on different store features because it linked directly to a particular theme and excluded any changes made to the `settings_data.json` file. But, the new CLI seems to add extra complications to the workflow by requiring frequent pulls and pushes.
Here’s my typical development workflow for version 1 themes:
As you can see, this was a simple workflow that allowed for features to be worked on by different devs using different theme instances. I frequently work on dev environments and then deploy the new features to production stores (i.e. they're both separate stores), so this workflow worked perfectly because of config.yml.
I’ve been working on a couple of 2.0 sites recently and am starting to find the push, pull and serve methods to be cumbersome. There have been occasions where I’ve accidentally reset some of the section settings data because I forgot to do a pull first or changed some code. This seems to be the main issue for me.
It would be good to get an idea of how other devs are managing their workflow. What is your development process for 2.0? Have you managed to get around the section settings data issue? And, how have you managed deployments between dev and live environments when they are two separate stores?
I haven't started using the new CLI/Github integrated workflow yet but I read somewhere that changes to the theme via the theme/code editors would automatically push said updates to your main branch in github. If this is true, shouldn't your git tool of preference have some way of telling you that your local main branch is behind the remote main branch? If working strictly from your CLI I guess you'll just have to make it a habit to always pull from remote main before pushing your dev branch to github.
So, I've linked both the live store and development store to Github, each with their own branch. So far it seems to be working okay with settings data being synced within their own branch, but it does produce some merge conflicts between the two branches which all seem to be caused by the section data within the json templates.
I think it'll be some trial and error, but the Github way seems to be the best method. It would be nice if the section data was stored in separate files so they could be ignored though.
I've gotten to the point that I have a shop-dev git repo theme which I use for all dev.
I started with a shop-dev and shop-production git branches, but like others have said the merge conflicts due to shopify's automatic pushes made it too annoying to manage, so I have an unlinked production theme as my live theme and use github for my dev theme only.
Hope that helps!
Hi @iambrianclark, yes that's what I have ended up doing too. Although, I connected Github to the live store so that I always get a fresh copy of any settings data before creating a new feature branch from it. Then I serve/push to the development store.
So far, so good!