Velo: Integrating Your Site With GitHub
When you connect your site to GitHub, several changes occur in the workspace. This articles explains these changes, and details how to disconnect your site from GitHub if you want to revert to normal editor use.
The GitHub Integration panel
When you connect your site to GitHub, a GitHub repository is created to store your site's code. Once this happens, the code in the editor is synced with the default branch of this repo.
The name of the connected repo as well as the details of commits to the default branch appear in the GitHub Integration panel of the sidebar.
![](https://user-images.githubusercontent.com/89579857/188308333-b67eeb2a-d422-4070-b38d-2cbee24127ae.png)
About read-only mode
While your site is connected to GitHub, the editor is in read-only mode. This involves the following changes:
- Code files are read-only. You can't make any changes to your site's code or add new files. Use your local IDE to add new files and change code.
- You can't add static event handlers to page elements using the Properties & Events panel. Instead, add dynamic event handlers to elements using code. To see the event handlers supported for each element, check the Velo API Reference.
- Changes to the fields in a collection are immediately reflected on your live site, even before you publish.
- If you duplicate a page on your site, the page's code isn't included in the copy.
Disconnect your site from GitHub
If you need to, you can disconnect your site from GitHub. When you do this, the site retains the code from the most recent commit to its GitHub repo's default branch. After disconnecting, the repo still exists in GitHub but changes to it aren't reflected on your site. Once your site is disconnected from GitHub, the editor exits read-only mode.
Important: Once you disconnect your site from GitHub and from a repo, you can't reconnect the site to that repo again. If you reconnect your site to GitHub later, a new repo is created.
To disconnect from GitHub:
-
Click the GitHub Integration icon on the sidebar.
-
Hover over your repo's name and click the More Actions icon.
-
Select Disconnect from GitHub.
-
In the modal, click Disconnect from GitHub.