My dedicated space, focusing on Power Apps and other Power Platform stuff 😉

Co-editing Canvas App at the same time

Canvas app has been there for many years. Building an apps with Power Apps is very fast even for only one developers. But will it be good if two or more developers can work on the same app at the same time? especially for big or complex app.

Well, The feature has been there for a while under “Experimental” feature, it’s called “Git version control

Once you enable this feature, many developers can work on the same app at the same time!

Before we start

As this feature is experimental feature, There are some many limitations you should note.

  • Experimental features aren’t meant for production use and may have restricted functionality
  • Auto-save will be disable when you enable this feature
  • All apps data will saved to Git repository instead of Power Apps
  • If you want to pull a lastest update of your app from Git to Power Apps, You need to Publish the app
  • Edits to the same property on the same control aren’t merged. The last edit made will win.
  • You can’t restore a canvas app to a previous version using the steps described in Restore an app article. Instead, you’ll have to use Git for restoring the app to a previous version
  • Selecting Close on the File menu may appear to delete your customizations in the app. However, customizations are not deleted. Refresh the page to see all customizations again.
  • and… many more. To keep most update about this you should refer to Microsoft docs: here

Let’s begin

Let’s see how you can properly enable this feature if you can accept all those limitations.

Register for GitHub or Azure DevOps

Power Apps Git version control support both GitHub and Azure DevOps repo.

Not everyone have GitHub or DevOps account. So, If you already have one of these, You should register it first. (If you’re new to Git, I recommend GitHub)

I will not go in detail about how to register them since registration steps is very simple.

I will use GitHub in this tutorial.

Create new repo

Once you get and GitHub account. You will need to create a GitHub repo to stored all of our apps data & code.

Go to this link and fill necessary information and make sure that you have checked “Add a README file” , then click Create repository

Don’t forget to set repo visibility to Private or everyone can publicly see all of your code!!!

When your repository is successfully created, You will see something like this, copy highlighted part in the picture, it’s repository URL, we will need to use it later

Obtain GitHub Personal Access Token

Now you need to something that let Power Apps connect to your repository. “Personal Access Token”

In order to generate this token, Simply go to this link

Then click, Generate new token

Enter note, expiration as you want. Make sure you select all scopes under repo as you see in the picture.

Then click on “Generate token” and very bottom of the page.

Once you have done this step you will see your Personal Access Token, Let’s copy this.

Make sure to keep this in secure place as you will not able to see it again!!!

Connect your Canvas app to GitHub

Now it’s time to connect our Canvas app to GitHub.

This is our app, You need to heading to Settings

Search for “Git” in Upcoming features tab and then enable Show the Git version control setting

You will notice that there are new tab appear, “Git version control” Click on this tab and then click Connect button

Enter repository detail as in the picture, you need to enter YOUR repository URL that you get from the beginning. For the branch and directory name you can enter the same as in the picture and then click Apply

Then enter your GitHub username and Personal Access Token you get from previous step and then click Sign in

If this popup appear, just click Yes

If your app successfully connected to Git, you will see this and you may notice that there are new “Sync Icon” appear at the top right

What’s the Sync Icon actually do

Well, once you enable Git version control for Canvas App, evertime your click Save or Sync, It will push all your changes to your Git repository and also pull all new changes on your repository then reload your app.

This mean that if there are 2 developers working on the same time, Once their both click Sync botton, they will see an update for each other.

Some example

  1. John and Sarah now working on the same app
  2. John add Button A to Screen1
  3. Sarah add Button B to Screen1
  4. John and Sarah click the Sync Icon
  5. John will see both Button A and Button B on Screen1
  6. Sarah will see both Button A and Button B on Screen1
How other developer can editing my app?

Well, other developer need an access to your repository by adding them as colloborator of your repository.

You can do this by heading to your repository and then Settings > Colloborators > Add people and then search for their GitHub account.

Then they will need Personal Access Token, They can follow the same step as you have done!

My comments

Well, As the time I writing this, This feature are an experimental feature. It’s very buggy and below are my personal note about this

  • I do not recommend to edit the same screen at the same time
  • You should always renaming your control to your name in order to prevent duplicate name on each developer

Leave a Reply

Your email address will not be published. Required fields are marked *