Source control in Theme Studio
Link a theme to a repository, pull and push changes, choose a side when both changed, name versions and go back to an older one.
Source control in Theme Studio
Source control keeps a theme and a repository (an online folder that keeps the history of every change) in step. You see what is new on each side, move changes both ways, and go back to an older version. Everything happens on buttons, and nothing publishes by itself.
Pull brings changes from the repository into your draft. Push sends your changes to the repository. A commit is one saved change in the repository's history.
When you use this
- You pushed a change from your own editor and want it in Sylloo.
- You changed a section in Theme Studio and want it saved in the repository.
- A new design broke something and you want the version from last week back.
- You move a design from Practice to Live: Practice pushes and Live pulls.
Before you start
- You need a developer account. If you do not see the Source control icon in the activity bar (the left icon strip), ask the business owner for access.
- GitHub must be connected. See Connect a repository.
- Create the repository at GitHub first. Sylloo does not create repositories.
Open Source control
Click the Source control icon in the activity bar. On a linked theme, you can also click the branch name in the status bar at the bottom.
Sylloo asks the repository for news when this view opens. An Update badge shows next to the theme name and in the status bar when new commits are waiting.
Link a theme to a repository
A theme you installed from a repository is already linked. For any other theme:
- In Source control, click Link to a repository.
- Fill in the window and click OK.
Nothing moves when you link.
- With an empty repository, your first push sends the whole theme.
- With a full repository, your first pull shows every file that differs, so you can choose.
The Link to a repository window
- Repository (required): type to search, or paste an address. A lock icon means private and a globe icon means public.
- Branch: the line of work to follow. Leave it empty to use the repository's main branch.
- Folder: leave it empty when the theme is at the top of the repository. Fill it in when one repository holds several themes, for example
shop. - Include theme settings: off by default, and off is safer. On sends your colours, texts and logos too, and a pull replaces them. They may hold business details.
- Cancel closes the window. OK saves the link.
Every field and control in Source control
When the theme is not linked
- Connect GitHub: shows when no account is connected. It starts the sign-in at GitHub in a new tab, so nothing open here is lost. Without the Source control right, you see a message to ask the owner of the business.
- Link to a repository: opens the window above.
- Refresh (arrows icon): asks the repository again.
When the theme is linked
- Repository · branch · short commit: where the theme is linked, and the last commit it matched.
- Change: opens the same window, to change the repository, branch, folder or settings switch.
- Unlink: ends the link after you confirm. The theme's files and the repository stay as they are.
- Connect again: shows with a warning when Sylloo lost access. It starts the sign-in again. Your theme files are safe.
- New commits on GitHub and Pull: shows when the repository has news. Otherwise you see Up to date with GitHub.
- Changes here: every file that differs from the repository, with a count.
- A is added here, M is changed here and D is deleted here.
- Click a file to open it.
- Changes (icon) shows the repository's copy and yours side by side.
- Take out of the draft (icon) drops your draft change to that file. It shows only for a file with a draft change.
- Message: one line about what changed, up to 200 letters. Required for Push.
- Push: opens the Push screen.
- Create version…: names this moment. See Versions.
- History: the commits of the branch and the versions (tags), each with Pull this, which goes back to it. See Go back to an older version. Show more loads older commits.
Pull
- Click Pull. The Pull screen lists what would happen. Nothing has moved yet.
- If files show under Both sides changed, choose a side for each one. See Conflicts.
- Read the warning, if there is one.
- Click Pull.
Result: the message says Pulled with the number of files in your draft. Text files go into your draft as one undo step. Preview, check and publish them as usual.
The list under Files
- Update: the repository changed this file and you did not. You get the new copy.
- Remove: the repository deleted this file and you did not change it. It leaves your theme.
- Keep mine: only you changed this file. It stays, and it goes out with your next push.
- At once: this file does not wait for Publish.
Pictures and CSS reach visitors at once. Files in
assets/(pictures, fonts, CSS and scripts) skip the draft. When the theme is live, the screen warns you: Careful: this theme is live. These files reach visitors at once, before you publish. It lists each file. To check them safely first, pull in Practice.
Conflicts
A conflict means you and the repository both changed the same file, in different ways. Sylloo does not mix the two. You pick one whole file.
- Under Both sides changed, click Changes to see both copies side by side. Mine is on the left and GitHub is on the right.
- Click Keep mine to keep your copy. It goes out with your next push.
- Or click Take from GitHub to replace your copy with the repository's.
The Pull button stays off until every conflict has a side. A file that is not text, such as a picture, cannot be compared. You see This file is not text, so it cannot be compared here. You can still choose a side.
Example: you changed the heading in sections/hero.html in Theme Studio. A colleague changed its image in the same file and pushed. Open Changes, note your heading and click Take from GitHub. Then type your heading again in the draft and push it.
Result: the file has both changes, and no work is lost.
Push
- Save your open files first. Unsaved files are not sent.
- Write one line in Message, such as
Larger hero on phones. - Click Push. The Push screen shows the repository, the branch and every file.
- Click Push.
Result: the message says Pushed. The repository has one new commit in your name. Nothing is published, and your draft stays a draft.
If the repository moved on, you see Newer commits exist, pull first. and a Pull button. Sylloo never overwrites the repository. Pull, then push again.
Public repositories. When the repository is public, the screen warns you every time: This is a public repository. Anyone can read what you push, including any page text in your templates. Page text typed in the website builder is stored in your templates. Make the repository private if that text must stay private.
A paid marketplace theme cannot be pushed to a repository. This protects the seller's files. You can push your own themes and the themes shipped by Sylloo.
Versions
A version names one moment, so you can come back to it.
- Push your changes first. A version needs a clean list.
- Click Create version….
- Enter a number such as
1.2.0. Sylloo suggests the next one.
Result: the message says Version 1.2.0 is created. The number is written into the theme's details. The repository gets a tag named v1.2.0.
If that number exists, you see The version v1.2.0 already exists.
Go back to an older version
- First make sure the theme has the newest commit. If New commits on GitHub shows, click Pull and finish that. Otherwise you see Newer commits exist, pull first.
- Under History, find the commit or version you want and click Pull this. The Go back screen lists what would change.
- If you changed some of these files, they show under Your unsaved changes. For each one, click Keep mine or take the older version with Take from GitHub.
- Click Go back.
Result: the message says The older version is in place. The older files are now ordinary changes here, and they show under Changes here. Text files are in your draft as one undo step. Nothing in the repository has changed.
Then choose:
- Publish the draft. Your website uses the older version, and the repository stays as it is.
- Push as well. This makes one new commit on top of the newest one, so the older version becomes the newest. History is never rewritten: the commits in between stay and you can still return to them.
New commits on GitHub stays truthful after you go back. It shows only when the repository really has commits you have not pulled.
Going back also changes pictures, fonts, CSS and scripts at once, like any pull. On a live theme, the screen lists them first.
What travels and what does not
| Moves between Sylloo and the repository? | |
|---|---|
layouts, groups, sections, snippets, templates, locale, assets, config/theme.json, config/settings_schema.json |
Yes |
config/settings_data.json (the business's colours, texts and logos) |
No, unless you switch on Include theme settings |
| Media in the File Manager, menus, sliders, pages, products | Never. They are the business's data, not theme files |
Other files in the repository, such as README.md and .github |
Never. Sylloo leaves them out and does not change them |
Example: bring a colleague's change in safely
Your theme is live. A colleague pushed a new section and a new assets/css/theme.css.
- Open Source control. You see New commits on GitHub.
- Click Pull. The red warning lists
assets/css/theme.css. - Choose a quiet moment, because the CSS changes for visitors at once. Click Pull.
- Open Preview and check the new section.
- Click Publish now.
Result: the CSS changed when you pulled, and the new section appeared when you published.
How to extend
- Keep several themes in one repository: put each one in its own folder and fill in Folder.
- Work on a branch: link to
redesign, push there, and merge at GitHub when ready. - Use one repository for many businesses: link it on each one and pull.
Rules and pitfalls
- A new commit never changes a website by itself. The Update badge tells you, and you pull and publish.
- A protected branch at GitHub refuses a push with a plain message. Choose another branch, or change the rule at GitHub.
- One action runs on a theme at a time. If someone else is working, you see Someone is working on this theme right now.
- Repository files pass the same checks as files you save here. One failing file refuses the whole pull.
Common questions
Does pushing change my website? No. A push only sends files to the repository.
Does linking move any files? No. Files move only when you click Pull or Push.
I removed the link by mistake. Click Link to a repository again and pick the same repository and branch. Nothing was deleted.
GitHub is down. Is my website affected? No. Your website never reads from GitHub while serving a page. Source control shows a plain message until GitHub answers.