Forum Discussion

henrituol's avatar
henrituol
Icon for Advocate II rankAdvocate II
1 year ago
Solved

How does the PBI Git integration work under the hood?

I'm using source control for my Power BI semantic models. The Git intergration (with Github) is usually fine, but there are some interesting errors that beg for a question. I made some small edits for column descriptions and the source control says there's changes that can be commited – just as I expected. I wrote commit message and commit. Now, Service starts to load things and eventually throws this error:

As you can see, the list doesn't include any items (I hid the URI and ID, but they shoudn't be relevant for this). Interestingly, the commit does show up in Github! Cool, maybe it worked as it should, since it was able to push the commit into Github. Alas, not so fast, it seems the workspace doesn't include the commit! Using Fabric REST API Git Get status, I can see the workspaceHead is not the same as remoteCommitHash. Indeed, the workspaceHead points to a commit right before this erroneous commit.

 

What happens in this situation? If we think in terms of Local Repo, local development environment, and remote repo, I was under the impression the workspace is like the local repo, where I make the edits and then push them to remote. But this error seems like this is not the case in PBI Service. Seems like it is possible to push commits to remote without committing to local. Seems somewhat odd.

 

What exactly happens under the hood when a workspace is added to source control?

  • Hi henrituol ,

    • Thank you for sharing your detailed observations — we completely understand your perspective. You're right, the Power BI Git integration does work differently from traditional Git-based tools like Visual Studio or Git CLI. The use of terms like Update and Commit (instead of "Pull" or "Commit and Push") is a deliberate design choice aimed at simplifying the version control experience for Power BI users while keeping the workspace in sync.
    • As you've noted, the ability to push changes without a conventional local commit is part of how the integration manages workspace synchronization, which does differ from standard Git workflows. Your insight is spot-on, and it’s great to see such thoughtful reflection.
    • If you'd like to see more flexibility or enhancements in how this integration works, we encourage you to share your suggestions on the Fabric Ideas - Microsoft Fabric Community. The product team actively reviews feedback there to guide future improvements.

    Regards,
    atheeq.

4 Replies

  • freginier's avatar
    freginier
    Icon for Solution Sage rankSolution Sage

    Perform an "Update from Git" (or "Pull") in the Power BI Service:

    • Go to the Power BI workspace connected to Git.
    • Locate the "Source Control" or "Git Integration" section.
    • You should see an indication that the workspace is "behind" the remote, or that there are "incoming changes."
    • Initiate an "Update" or "Pull" action. This will force the workspace to synchronize with the latest commit on your GitHub branch (which now includes your previously failed commit).

    This action will bring the workspaceHead in sync with the remoteCommitHash on GitHub, resolving the discrepancy. While the initial commit operation failed to update the workspace's state, the actual changes were pushed to GitHub. A subsequent "pull" from the workspace corrects its internal tracking.

    • v-aatheeque's avatar
      v-aatheeque
      Icon for Community Support rankCommunity Support

      Hi henrituol ,

      If the information posted by freginier   is helpful, please accept the answer by clicking the "Upvote" and "Accept Answer" on the post. If you are still facing any issue, please let us know in the comments. We are glad to help you.

      We value your feedback, and it will help us to assist others who might have a similar query.

      Thank you for your contribution in enhancing Microsoft Fabric Community Forum.

       

    • henrituol's avatar
      henrituol
      Icon for Advocate II rankAdvocate II

      This is indeed the way how the workspace brings everything back in-sync, just as the documentation says. However, I more interested in how and why this is the case. Do you undestand what I'm wondering? The PBI Git intergration seems to be very different compared to other products using source control. Here, it seems, you can push commits to remote even though they are not commited to local repository. I suppose this is one reason, why the UI has buttons like "Update" instead of Pulling, and "Commit" instead of "Commit and push" etc.

      • v-aatheeque's avatar
        v-aatheeque
        Icon for Community Support rankCommunity Support

        Hi henrituol ,

        • Thank you for sharing your detailed observations — we completely understand your perspective. You're right, the Power BI Git integration does work differently from traditional Git-based tools like Visual Studio or Git CLI. The use of terms like Update and Commit (instead of "Pull" or "Commit and Push") is a deliberate design choice aimed at simplifying the version control experience for Power BI users while keeping the workspace in sync.
        • As you've noted, the ability to push changes without a conventional local commit is part of how the integration manages workspace synchronization, which does differ from standard Git workflows. Your insight is spot-on, and it’s great to see such thoughtful reflection.
        • If you'd like to see more flexibility or enhancements in how this integration works, we encourage you to share your suggestions on the Fabric Ideas - Microsoft Fabric Community. The product team actively reviews feedback there to guide future improvements.

        Regards,
        atheeq.