Source Control Best Practices

Highlighted
Shopify Partner
3 0 0

Hi,

I am a Shopify n00b, but I hope this is a solved problem and someone can point me in the right direction :)

I would like to store my sites in version control - including content that is edited online in the Shopify backend.

The current workflow I am using is having the Shopify Theme app download the content and then commit it locally, but there are issues with this.

My main problem is that the online version and local version easily get out of sync - changes made in the Shopify backend are not automagically downloaded back to my local version. There may be a trick to this that I'm missing somewhere.

I'm guessing there is a simple way to access content remotely, but the lightbulb hasn't switched on yet. What sort of workflows are folk using? I have had a crawl around the forum but haven't found anything that solves my problem yet :)

Thanks heaps.

0 Likes
Highlighted
Shopify Expert
4179 29 401

Why would the online version get out of sync? If you work locally, and maintain local versions, then you push your local changes to the live version and they're in sync. If someone else changes the live version using Shopify theme editor, just ensure you pull down a live copy and merge it with your local one. Hence you get to use version control and not have too many issues. 

Not only that, you can leverage a service like github and have all your development done with that, and then have developers work on branches that you then work with pull requests. Works like a charm. 

Not sure where you exactly struggling, but it is certainly normal to work with version control ( and not just the versioning built-in to Shopify)... 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Partner
3 0 0

Yeah, I use GitHub for other projects, and was planning on using it here too.

I know it's probably simple - but I'm just missing something somewhere. 

Why would the online version get out of sync?

I haven't worked out how to pull changes from the online version yet. The Shopify tool seems to be great at uploading local changes, but I haven't found a way to pull changes from the online version. This is mostly a problem when theme settings are changed online.

If someone else changes the live version using Shopify theme editor, just ensure you pull down a live copy and merge it with your local one. Hence you get to use version control and not have too many issues.

Is there a trick to pulling down the code from the live version? Kinda like a git pull but for the Shopify Theme app? That would solve my problems I think.

 versioning built-in to Shopify)... 

Is this true? Where might I come across this? I know backups are handled by Shopify, but is there some sort of VCS somewhere too? Version control for the content would be mighty grand.

Thanks for your help - really appreciated.

0 Likes
Highlighted
Shopify Expert
4179 29 401

I use the shopify_theme gem, and it provides a command theme download and that works swell at pulling the live version to your local. You can even specify a theme ID to be specific and work on secondary themes. 

 

Custom Shopify Apps built just for you! hunkybill@gmail.com http://www.resistorsoftware.com
0 Likes
Highlighted
Shopify Partner
3 0 0

That's brilliant. Thanks for your help. I'll get that going :)

0 Likes
Highlighted
New Member
1 0 0

https://footballyser.wordpress.com/


@H2OBorne wrote:

Yeah, I use GitHub for other projects, and was planning on using it here too.

I know it's probably simple - but I'm just missing something somewhere. 

Why would the online version get out of sync?

I haven't worked out how to pull changes from the online version yet. The Shopify tool seems to be great at uploading local changes, but I haven't found a way to pull changes from the online version. This is mostly a problem when theme settings are changed online.

If someone else changes the live version using Shopify theme editor, just ensure you pull down a live copy and merge it with your local one. Hence you get to use version control and not have too many issues.

Is there a trick to pulling down the code from the live version? Kinda like a git pull but for the Shopify Theme app? That would solve my problems I think.

 versioning built-in to Shopify)... 

Is this true? Where might I come across this? I know backups are handled by Shopify, but is there some sort of VCS somewhere too? Version control for the content would be mighty grand.

Thanks for your help - really appreciated.


 

0 Likes