Forum Discussion
How to organize a Version Control Strategy in Power BI using Azure DevOps
Hi folks,
I have a general question about organizing a suitable development strategy for version control in Power BI using Azure DevOps.
I have a PPU workspace called Workspace1 in Power BI Service.
In Azure DevOps, I created a Git repository named WS_Workspace1. I linked this Git repository to the Power BI Service workspace. The branch selected in Power BI Service is the main branch.
I cloned the Git repository WS_Workspace1 locally to my laptop. Now I want to develop reports locally using Power BI Desktop and create multiple reports that are intended to be stored in the Workspace1 workspace. Using Visual Studio Code, I want to commit the changes and sync them to Azure DevOps, and finally deploy the reports from there to the Power BI workspace Workspace1.
I now have the requirement to be able to restore an older version of any report in Workspace1 using the Git repository in Azure DevOps and save it back to Power BI Service, if necessary, for each individual report. How should I ideally organize my work (branches or tags, everything which could be helpful...) so that I am able to restore an older version of a single report without affecting other reports and what would be the procedure if I needed to restore a report?
Thank you for your help!
Best regards!
Hi Flo1,
here's a practical version control strategy for your Power BI workspace:
Branch Strategy:
Main branch: Production-ready reports only (what's in Workspace1) Feature branches: One per report or feature - feature/report-sales-dashboard, feature/report-inventory Development branch (optional): Staging area before merging to main
Workflow for developing reports:
- Create a feature branch from main: git checkout -b feature/new-sales-report
- Develop your report locally in Power BI Desktop
- Save as .pbix and commit to your feature branch
- Push to Azure DevOps: git push origin feature/new-sales-report
- Create a Pull Request to merge into main
- After approval, merge to main and sync to Power BI Service
To restore an older version of a single report:
- Find the version: In Azure DevOps, navigate to Repos → Commits → find the specific report's commit history
- Create a restore branch: git checkout -b restore/sales-report-v2 <commit-hash>
- Extract the specific .pbix file from that commit
- Upload manually to Power BI Service or commit to a new branch and merge
Best practices:
- Tag releases: Use Git tags for major versions: git tag v1.0-sales-report
- Commit granularly: One report per commit when possible, with clear messages: "Update Sales Report - added Q4 data"
- Separate .pbix files: Keep each report as a separate .pbix file in the repo for independent versioning
- Use .gitignore: Exclude temp files but keep .pbix files tracked
Feel free to check out also the MSFT docs for further options and hints: Git integration workspaces - Microsoft Fabric | Microsoft Learn
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
2 Replies
- Mauro89Super User
Hi Flo1,
here's a practical version control strategy for your Power BI workspace:
Branch Strategy:
Main branch: Production-ready reports only (what's in Workspace1) Feature branches: One per report or feature - feature/report-sales-dashboard, feature/report-inventory Development branch (optional): Staging area before merging to main
Workflow for developing reports:
- Create a feature branch from main: git checkout -b feature/new-sales-report
- Develop your report locally in Power BI Desktop
- Save as .pbix and commit to your feature branch
- Push to Azure DevOps: git push origin feature/new-sales-report
- Create a Pull Request to merge into main
- After approval, merge to main and sync to Power BI Service
To restore an older version of a single report:
- Find the version: In Azure DevOps, navigate to Repos → Commits → find the specific report's commit history
- Create a restore branch: git checkout -b restore/sales-report-v2 <commit-hash>
- Extract the specific .pbix file from that commit
- Upload manually to Power BI Service or commit to a new branch and merge
Best practices:
- Tag releases: Use Git tags for major versions: git tag v1.0-sales-report
- Commit granularly: One report per commit when possible, with clear messages: "Update Sales Report - added Q4 data"
- Separate .pbix files: Keep each report as a separate .pbix file in the repo for independent versioning
- Use .gitignore: Exclude temp files but keep .pbix files tracked
Feel free to check out also the MSFT docs for further options and hints: Git integration workspaces - Microsoft Fabric | Microsoft Learn
Best regards!
PS: If you find this post helpful consider leaving kudos or mark it as solution
- v-karpurapudCommunity Support
Hi Flo1
Thank you for reaching out to the Microsoft Fabric community forum.
I would also like to thank you Mauro89 for your active participation and for sharing solutions within the community forum. Your contributions are truly valuable.
I hope the information provide helps resolve your issue. If you have any further questions or need additional assistance, please feel free to contact us. We are always here to help.
Best regards,
Community Support Team.