Power BI Desktop projects Git integration

Important

Power BI Desktop projects is currently in preview.

Git integration in Microsoft Visual Studio Code (VS Code) enables Pro BI developers working with Power BI Desktop projects to streamline development processes, source control, and collaboration with Git repositories.

With Git integration, you can:

  • Backup and version your work.
  • Revert to previous states.
  • Collaborate with others or work alone using Git branches.
  • Use the capabilities of familiar source control tools, like Azure DevOps.

Prerequisites

Create a local Git repo using VS Code

  1. In VS Code, open a Power BI Desktop project folder:

    Image showing open folder in VS Code.

  2. Initialize a Git repository by selecting Source Control > Initialize Repository:

    Image showing Initialize Repository in VS Code.

  3. Do an initial Commit and enter a message:

    Image showing a commit in VS Code.

From now on, any changes you make in Power BI Desktop changes a file in the folder tracked by your local Git. For example, in Power BI Desktop, when you change a DAX formula for a measure and then save, it triggers a Git diff on the model.bim file.

Image showing a measure change in VS Code.

With Git integration, you can not only backup your work, but also track your change history. For example, with GitGraph, a popular free VS Code extension, you can easily track all your changes.

Image showing GitGraph in VS Code.