Quickstart: Version Control

Saving, publishing and working on different versions of your app

Anvil apps have full version control backed by Git.

Follow this quickstart to create an app with two different versions, and publish a particular version of the app.

Create an app

Log in to Anvil and click ‘create app’. Choose the Material Design theme.

Location of the Create App button

Add a Label to the page

You will see your app in the centre of the screen. On the right is the Toolbox, which contains components to drag-and-drop.

Drop a Label Label icon into the page.

Select it and change its text property to This is version 1.0 using the Properties Panel on the right.

Save this version

Click the ‘Save this version’ button at the bottom of the App Browser. Enter version 1.0 into the text box.

The App Browser with the Save This Version button clicked. There's a box to enter your commit name.

Now click on ‘View history’. You will see a dialog like this:

Version history tree with an initial commit and one other commit called 'version 1.0'

Change the Label contents and save again

Close this dialog and change the text property of your Label to say This is version 1.1.

Design View showing the Label saying 'This is version 1.1'

Click the ‘Save this version’ button again and enter version 1.1.

Now click on ‘View history’. Your history will now look like this:

Version history tree with an initial commit and two other commits called 'version 1.0' and 'version 1.1'

Publish the previous version

Click on the ‘Publish’ link at the bottom of the version 1.0 commit. The history view will show a ‘Published’ label on the commit:

The same version history tree, but 'version 1.0' has a 'published' label below it

Now your app will run a different version in the Anvil Editor to the one it runs online.

Run the app

Click the ‘Run’ button at the top of the screen.

Running your app in the editor

You’ll see This is version 1.1.

The dev version of the app running in the editor

View the published version

Click on ‘Publish this app’ in the top-right corner of the screen. You’ll see a dialog like this:

The publish app dialog showing the private URL for this app

Click on the link in the ‘Share via private link’ box. You’ll see something like this:

The published version of the app running in a normal browser tab

This is how your app looks to your users. The Label says This is version 1.0 - your published version is different from your development version. You can go on developing your app and only publish your changes when they’re ready.

Next up

Want more depth on this subject?

Each app is a Git repository. You can clone a repo containing the app’s code and configuration files, work with it on your own machine and make commits, then push back to Anvil.

Read the Version Control section to find out more.

What another quickstart?

Every quickstart is on the Quickstarts page.