You are currently viewing the new Anvil Editor Docs.
Switch to the Classic Editor Docs main page
You are currently viewing the Classic Editor Docs.
Switch to the new Anvil Editor Docs

Quickstart: Working with GitHub

Version control, collaboration and open-source made easy

Anvil comes with GitHub integration that can automatically sync your Anvil app’s code with a GitHub repository. This lets you take advantage of GitHubs extensive tools for collaboration and version control without needing to be a Git expert.

Follow this quickstart to learn how to connect your Anvil apps to GitHub.

Save an app as a GitHub repo

Create an app

Log in to Anvil and click ‘New Blank App’. Choose the Material Design 3 theme.

The Anvil Start Page

Save it to GitHub

Open the Version History tab in the Bottom Panel and click the “Save app to GitHub” button.

The Save to GitHub button

This will open a pop up for Anvils GitHub integration. Follow the steps to authorise Anvil for your GitHub account or organisation, and then choose where you want to create your repository.

Make it a public repository and choose “MIT licence” as the licence for this project.

Choose Licence modal

Finally, name the repository “my-anvil-repo” and click “OK” to finish creating it.

'Choose a name' modal

With that, you’re connected. Changes you make on the Anvil editor will be automatically pushed to GitHub, and changes from GitHub will be automatically reflected in your Anvil app.

Take a look at your app’s code on GitHub

Click on the three dots next to the “Sync Git Remotes” button to open the dropdown menu, and select “View on GitHub”.

Sync Git Remotes dropdown

This will take you directly to your repository on GitHub, where you can manage your code.

The repository in GitHub

Checkout an app from GitHub

Go to the Start Page and click on “Clone from GitHub”, underneath the “Blank App” option.

Clone from GitHub

Enter the URL of the Git repository you wish to clone and choose “GitHub credentials” as the authentication method, so you have edit access. If you’re not yet logged in, click on “Connect to GitHub”.

Clone App from Git modal

Finally, click on “Clone App”.

Now, you can make changes into this app that will be automatically synced with the Github repository, and viceversa.

Next up

Want more depth on this subject?

Read more about collaborating with Git and GitHub.

Want another quickstart?

Every quickstart is on the Quickstarts page.


Do you still have questions?

Our Community Forum is full of helpful information and Anvil experts.