Today, we will look at how you can use Git hub 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).
Provide a repository name and description (If you want).
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
b. From the settings page, select the Developer Setting menu
c. Select “Personal access tokens” > “Fine-Grained tokens” and click “Generate a new token”
d. Set your token details
- 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.
Once you set your permissions, click Generate token.
Make sure you copy your token to a safe place.
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.
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
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.
The next screen allows you to input your username (Github username), and token from step2.
Once you enter the login and token details, you will see the following screen:
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
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:
Enjoy 😍 !