Re: Shopify development strategy

How do I manage version control in Shopify development?

SvenSvensson
Tourist
11 1 2

Hi!
I'm fairly new to Shopify and it's not my main work. I'm only helping out a friends, so I do a few hours every now and then to help him customize his theme. 

So far he's worked with the Shopify's online editor and had no version management. 

That means that each time he update is theme, he overwrites all the changes I've made before since he doesn't know where to look for them.  And since I only work now and then it's really hard to keep track of them. And let's be honest, the online editor sucks. No search function, bad history management, har to see what has changed etc.

To address this issue I have setup a dev and a main branch in Github, and will force him to start use VSCode and commit his change. 
I have connected these branches to Shopify and it seems to work fine.

I just want to make sure I have understood this correctly, so I will make a few assumptions and please correct me when I'm wrong:


1. Whenever i push new code, Shopify automatically retrieves the files and update the theme?
2. If I have made changes in the online editor in files that are changed on Github they will be overwritten without any fuss?
3. If I have made changes in the online editor to files that are has not been changed on Github they will not be overritten? Shopify only applied the new file and not the entire theme?
4. When I publish my main branch theme, it will not have to be republished when new changes is pushed to main branch. It will just automatically update, hence, only dev branch should be merged to main, after everything has been verified in the dev-branch theme.

 

One additional big question I 've been thinking about is data separation for these different tracks.

Let's say I want to add Accessories to the shop. I add accessories, and edit the menu to add the page so I can access them, but I don't want the users using the main theme to see these.
Can I somehow control which theme can use what information? Or only show information for logged in users?
Or am I supposed to have two different shops for development, like you usually do in for example Wordpress. Where you then export/import the database and files when you're done with development?

 

Thanks!

Reply 1 (1)

Bilash
Shopify Partner
25 2 1