SamTech 365

Power Platform, Copilot & SharePoint guides by Samir Daoudi

Power Apps – GitHub Integration

Use GitHub integration for Power Apps version control: connect canvas apps to a repo, track changes and collaborate with other makers.
GitHub Integration

Today, we will look at how you can use GitHub Integration for version control and collaborating on your Power Apps Project.

1- Sign up to Git Hub

I assume you already have a git hub account, if not, you can sign up for free from https://github.com/

 

2- Create a Git hub Repository

First thing, you will need to create a repository for your project.

It is important to keep the repository as a private one (unless, you have good reasons to make it public).

 

Power Apps - GitHub Integration

Provide a repository name and description (If you want).

Power Apps - GitHub Integration – screenshot 2

3- Create a PAT (Personal Access Token)

Once you create your new repository, you will need to generate a Personal Access Token, which will be used to read/write data from/to your GitHub repository.

a. Navigate to your GitHub Settings

Power Apps - GitHub Integration – screenshot 3

b. From the settings page, select the Developer Setting menu

Power Apps - GitHub Integration – screenshot 4

c. Select “Personal access tokens” > “Fine-Grained tokens” and click “Generate a new token”

Power Apps - GitHub Integration – screenshot 5

d. Set your token details

 

Power Apps - GitHub Integration – screenshot 6

  • Token name: Your token’ name.
  • Expiration: Expiry date of your token.
  • Description: Optional, provide a description for your token/usage.
  • Repository Access: You can give your token access to all or specific repositories.
  • Permissions: Grant your token the required permissions.

Power Apps - GitHub Integration – screenshot 7

Once you set your permissions, click Generate token.

Power Apps - GitHub Integration – screenshot 8

Make sure you copy your token to a safe place.

Power Apps - GitHub Integration – screenshot 9

4- Enable the Git Hub Experimental

We will need to activate the experimental feature “Show the Git version control setting“.

  • From you App, navigate to the settings page, and select the upcoming features.
  • Search for the Show the Git version control setting feature and enable it.

Power Apps - GitHub Integration – screenshot 10

5- Connect Power Apps to your Git Hub Repository

Once you enable the “Show the Git version control setting” feature, a new section will appear in your App Settings

Power Apps - GitHub Integration – screenshot 11

 

Click Connect, and let’s go through the wizard:

  • Git repository URL : This is the root URL of your repository.
  • Branch: this is the name of the branch you will use for your project.
  • Directory name: the folder name where your app code will be synchronised to. Strangely, this can’t be a blank or / for the root level, your app will need to be synchronised to a folder.

Power Apps - GitHub Integration – screenshot 12

Click Apply.

The next screen allows you to input your username (Github username), and token from step2.

Power Apps - GitHub Integration – screenshot 13

 

Once you enter the login and token details, you will see the following screen:


Power Apps - GitHub Integration – screenshot 14

6- Commit your changes to Github

Once you finish the setup steps, you will notice this new icon on the top right side of your screen

Power Apps - GitHub Integration – screenshot 15

 

Anytime you change your app, you can commit these changes to git hub.

7- Your app content in Git Hub

Now, you can navigate back to github and check your app content.

As we have specified a folder name “SelfService”, you will find all your files in this folder:

Power Apps - GitHub Integration – screenshot 16

Enjoy 😍 !

Related guides

Discover more from SamTech 365

Subscribe now to keep reading and get access to the full archive.

Continue reading