Setting up Power BI Version Control with Azure Dev Ops
In this blog post is a way set up version control for Power BI semantic models (and reports) using the PBIP (Power BI Project) format, Azure DevOps (Azure Repos), and VS Code.
This approach treats your semantic model as readable text files (JSON/TMDL), enabling proper Git diffing, branching, merging, and collaboration—something binary .pbix files don’t support well.
Prerequisites
- Power BI Desktop (latest version recommended; June 2023 or newer).
- Git installed (download from git-scm.com).
- VS Code – Download Visual Studio Code – Mac, Linux, Windows
- An Azure DevOps organization and project (free tier works for most teams).
Setting up the GitHub Extension in Visual Studio Code
The steps below detail how to install the GitHub extension for Visual Studio Code.
- The first step is to download and install GIT.
- Git – Downloads (git-scm.com)
- Click on Windows and download.
- Make sure to select 64-bit Git for Windows Setup (This is to match the 64-bit version of VS Code)

- During the installation accept all the defaults and install.
- Once installed click on Finish.
Configuring your user.name and user.email in GIT
The next step is to configure your user.name and user.email in order to successfully commit into GIT in later steps.
- The first step is to open command prompt.
- Then type in the following to configure your user,name for GIT
git config –global user.name “Gilbert Quevauvilliers”
git config –global user.email “[email protected]”
-
- If it completes there will be nothing coming back in the command prompt.
Creating and cloning Azure Dev Ops Repo
Log into Azure Dev Ops
- Click on New Project
- Create a new Project
- Give it a name and make sure it is set to Private as you only want this to be accessible to the relevant people

- Click Create
- Once it has been created you will see the Project as shown below.

- To initialize the main branch, click on Repos
- At the bottom of the screen click on Initialize under “Initialize main branch with a README or gitignore”

- NOTE: This is to create the main branch.
- Once completed you will then see the main branch and the README.md

Cloning the Project to VS Code
The next step is to clone the project so it is available in VS code
- Click on Clone
- Next, on the Clone Repository click on “Clone in VS Code”

- This will then open VS Code, where it will ask you to “Select as Repository Destination”

- I selected my folder

- I could then see my repository being cloned

- I was then prompted where I would like to open the repository, I selected “Open in a New Window”

- I would recommend this open, as this will be separate from other VS Code applications you have open.
- I could then see my Repository in VS Code

Adding my Power BI PBIP to Version control
The next step was to add my Power BI PBIP to Version Control
Update: As mentioned by (13) Michael Morrison | LinkedIn here is a link on how to create the PBIP Power BI Desktop projects (PBIP) – Power BI | Microsoft Learn
- I opened my existing PBIP, clicked on File, Save As and saved it to the same folder as I selected above.

- Now when I went back into VS Code I could see my new files that I had added into the folder

- This is showing that there are new files.
Staging and committing updates to Azure Dev Ops
The next step is to stage and commit the changes to Azure Dev Ops, so that the files will now be in version control.
- In VS Code, I clicked on the Source Control

- I then clicked on the + sign to stage all my changes at the top

- NOTE: If I wanted to, I could select individual items to put into stage
- I then put in a comment for my commit, and I could see all the stage changes as shown below.

- I then click on Commit.
- Next, I clicked on “Sync Changes” to sync the changes to Azure Dev Ops

- On the sync changes screen I clicked on OK

- I could then see the changes being committed and my repository being synched.

Validation in Azure Dev Ops
To make sure that the files were put into Version Control I went into my Azure Dev Ops repo to have a look.
- I went to my Project, then under Repo, Files I could see the files.

Making changes in PBIP and committing to version control
The final step is to make a change to my PBIP and commit the changes to version control in Azure Dev Ops
- I added a comment to my measure in Power BI as shown below.

- I then saved my PBIP Project
- I went back to VS Code, where I could see that my TMDL file called “Column Parameters” had been modified
- I then clicked on the + sign to stage all my changes at the top

- I then put in a comment for my commit, and I could see all the stage changes as shown below.

- I then click on Commit.
- Next, I clicked on “Sync Changes” to sync the changes to Azure Dev Ops

- On the sync changes screen I clicked on OK

- I could then see the changes being committed and my repository being synched.

Comparing differences for files
If I wanted to see the differences in the files I could do the following in VS Code
- IN the section where it says Graph, click on the relevant commit I am interested in
- In this example it was called “Updated Measure Num Customers with Comment”
- Now in VS Code I could see the difference between the previous file and the updated file.
- NOTE: The left-hand side is always the previous file.
- NOTE II: The changes are highlighted in green.

Summary
In this blog post I’ve shown you how to set up. RBI projects with Azure Dev Ops to get it into version control.
I hope you found this useful and as always, if you have any comments or suggestions, please let me know.
Thanks for reading.


