POWER BI

Git for Power BI and Fabric Users: A Beginner's Guide

Oscar Martínez
Oscar Martínez Data, BI and AI | Operational Lead | Power BI & Azure Expert | Governance-Driven Strategy | Product Owner

Three years ago, building a Power BI report meant opening Power BI Desktop, connecting to a source, and saving a .pbix file. That workflow has not disappeared. But with the PBIR report format (Power BI Enhanced Report Format), Power BI Projects (.pbip), Fabric, MCP servers, and AI coding agents entering the picture, the developer experience is changing fast; the gap between BI development and software engineering is quickly narrowing.

That shift means Power BI and Fabric developers need to upskill across a broader set of technologies. Git is one of the most important. This post covers what it is, how to install and use it on Windows without living in the terminal, and what to expect when things get complicated. The examples use Power BI Desktop and .pbip files, which do not require a Fabric capacity; you can follow along today with the tools you already have. Everything you learn here transfers directly to Fabric.

Preview feature

Power BI Desktop Projects (.pbip) and the Power BI Enhanced Report Format (PBIR) are preview features at the time of writing. Each may reach General Availability independently — check the Microsoft release notes for current status. Until then, they must be manually enabled in Power BI Desktop under File > Options > Preview Features. Microsoft does not recommend using preview features in production client environments. Known limitations include: no support for sensitivity labels, no support for Template App workspaces, and incremental refresh partitions cannot be set via the Fabric REST API.


Power BI and Fabric are becoming development platforms

The change started with Power BI Projects (.pbip). Unlike the traditional .pbix file, which is a single binary blob your computer can open but a diff tool cannot read, a Power BI Project stores everything as a folder of separate, readable text files. The report layout, the data model, the relationships, the measures: each has its own file. Open any of them in a text editor and you will see exactly what is inside.

Binary file vs folder structure

A .pbix is a sealed container (a single packed file that tools cannot inspect line by line). A .pbip is an open folder. That difference is what makes one invisible to Git and the other fully trackable. Git works by comparing versions of text files — showing you a diff, a side-by-side view of exactly what changed — and a binary .pbix gives it nothing to compare.

Monolithic binary (.pbix)
sealed binary
SalesReport.pbix
Git sees one opaque file
no useful line-by-line diff
Folder tree (.pbip)VS Code Explorer
SalesReport/
SalesReport.Report/
definition.pbir
definition/
pages/
SalesPage/
visual.json
SalesReport.SemanticModel/
model.bim
SalesReport.pbip
Git tracks every file and changemeasures, pages, model files, and report metadata

Same report. On the left, Git sees one sealed file with nothing useful to compare. On the right, it sees the project as a folder of trackable files.

Fabric extends the same structure to notebooks, pipelines, lakehouses, and semantic models, with native Git integration built directly into workspaces. The mechanics are the same; only the surface changes.

The same project. Two very different realities.
AspectWithout GitWith Git
File managementreport_final_v2_USE_THIS.pbipOne folder. Full history.
Change trackingUnknown who changed what, or whenEvery change attributed, dated, described
CollaborationEmail attachments, overwritten workBranches, review, controlled merge
AI agent changesNo visibility into what the agent didReview, approve, or revert every change

Both teams are using .pbip files. Only one knows what happened last Tuesday.


Which app does which job
Power BI Desktopbuild and edit reports and models using the visual interface; save changes here
VS Codereview changes, stage, and commit — and today also edit PBIP files directly with an LLM or MCP server
Gitrecords version history quietly on your machine; only saves a version when you commit
GitHub / Azure DevOpshosts the shared repository in the cloud; the team pushes and pulls from here

Setting up your system

You need three tools, and each plays a distinct role. VS Code is your workspace — the visual environment where you write, review, and commit changes without touching a terminal. Git is the engine that runs quietly on your machine and actually tracks the history; every other tool in this list depends on it. A Git host (GitHub or Azure DevOps) is the cloud copy of your repository — the shared version your team pushes to and pulls from. All three are free.

1. Install VS Code

Visual Studio Code is where you will do all your day-to-day Git work. Git support is built in; no extension is required.

VS Code can open individual files, but its real strength is working with folders. When you open a folder, VS Code treats it as a project: the file explorer shows the full tree, the terminal opens at the root, and Git tracks everything inside it as a single workspace. A .pbip project is a folder, so this maps directly: open the SalesReport/ folder in VS Code and you have your entire report and semantic model in one place.

Tip

VS Code’s UI handles day-to-day Git well, but hides some advanced operations. If something goes wrong and you need to recover a lost branch or undo a complex merge, you will eventually need a few terminal commands. That situation is rare for beginners; when it happens, searching for the exact error message will give you the commands you need.

2. Install Git

Download and install Git for Windows. Accept the default settings throughout; you do not need to change anything. Git runs quietly in the background. It is the engine every other tool in this list relies on; nothing else works without it.

3. Create an account on a Git host

GitHub is the recommended starting point. It is the most widely used platform, free for private repositories, and straightforward for personal projects or small teams. VS Code opens a browser sign-in window the first time you connect, so setup takes under a minute.

Azure DevOps Repos is the enterprise standard for Microsoft-stack teams. If your organisation uses Azure DevOps for work items or pipelines, your Git repositories belong there too. Fabric workspaces can connect to Azure DevOps repos for Git integration when a Fabric capacity and tenant admin enablement are in place — which makes it the natural choice for corporate BI teams. In most organisations it is already licensed and provisioned.

GitLab and Bitbucket are solid alternatives in organisations that prefer self-hosted infrastructure. The Git concepts are identical across all platforms; only the interface differs.

4. Configure your identity

Git attaches your name and email to every commit you make. You only need to do this once per machine. Open VS Code’s integrated terminal with Ctrl+` and run these two commands:

git config --global user.name "Your Name"
git config --global user.email "you@example.com"

These are the only two terminal commands in the entire setup. Paste them exactly after replacing the name and email, then close the terminal — everything else in this guide uses VS Code’s visual interface.

After that, every commit on that machine will carry your identity automatically.

Before moving on, check that you have all four pieces in place: VS Code installed, Git installed, an account on GitHub or Azure DevOps, and your name and email configured with git config. If any of these is missing, the practical steps later will not work.


Core Git concepts

Before touching any tool, these are the concepts that matter. You do not need to memorise them all at once. Read through, then come back when something in the practical section feels unfamiliar.

What is Git

Git is a version control system. At its core, it records snapshots of your project files over time. Every time you save a snapshot (called a commit), Git stores what changed, who changed it, and a short message explaining why. You can return to any earlier snapshot at any time.

Think of it as a time machine for your project folder. The folder looks exactly the same on your machine; Git manages the history quietly in the background.

What Git is not

Git is not GitHub. This is the most common point of confusion. Git is the tool that runs on your machine and tracks changes. GitHub is a website that hosts Git repositories in the cloud so teams can share them. The two are separate; you can use Git without GitHub entirely.

Git is also not OneDrive or SharePoint. Those tools sync files automatically in the background. Git requires you to decide what to save and when. That deliberate choice is what makes it powerful. A sync tool records every keystroke; Git records decisions.

Git is not only for software developers. Power BI analysts, Fabric engineers, data engineers, and report authors all benefit. If you edit files and work with other people, Git applies to you.

What is a repository

A repository (repo) is the folder Git is tracking. Everything inside it can be versioned. When you initialise Git in a folder, it starts watching that folder and all its contents.

Initializing a repository

You initialise a repository once. In VS Code, open the project folder and click Initialise Repository in the Source Control panel (Ctrl+Shift+G). Git creates a hidden .git folder at the root. That folder is the repository; do not delete or move it.

The .gitignore file

When you initialise a repository, VS Code will offer to create a .gitignore file. Accept it. A .gitignore tells Git which files to skip entirely: cache files, local settings, and temporary outputs that should never be committed or shared. For PBIP projects the defaults already cover the important cases (cache.abf, localSettings.json), but you can add anything else your team agrees should stay out of version control.

What is committing

Before you can commit, you need to understand one concept that surprises almost everyone coming from SharePoint or OneDrive: staging.

When you save a file in OneDrive, it syncs immediately and automatically. Git works differently. Saving a file just changes it on disk; Git does not record anything yet. To commit, you first stage the files you want to include in the snapshot. Staging is your chance to say “these specific changes belong together” before committing them as a single, described unit.

Git sees your project in three zones at all times:

ZoneWhat it is
Working directoryThe actual files on your machine — any edits you make land here first
Staging areaFiles you have marked as ready to snapshot — a preparation zone
RepositoryThe committed history — permanent, attributed, time-stamped snapshots
Three zones Git tracks at all times
Working DirectorySales.bimedited · not stagedyour edits live heregit add+ in VS CodeStaging AreaSales.bimstaged · readyqueued for commitgit commitcheckmark in VS CodeRepository (.git)a3f9c2dcommitted · safepermanent local history

Staging lets you choose exactly which changes go into a commit. An unstaged file stays in the working directory until you are ready to commit it separately.

A practical example: you updated a Margin % measure and also changed a page title, but the title change is not ready yet. Stage only the measure file, commit it with the message Add Margin % measure, and leave the title change in your working directory for the next commit. The staging area is what makes this precision possible.

A commit is a snapshot of everything in the staging area at the moment you commit. Git attaches your name, a timestamp, and a message explaining why the change was made. You can return to any commit at any time.

In VS Code, the staging area lives in the Source Control panel (Ctrl+Shift+G). Files with unsaved changes appear under Changes. Click the + next to a file to move it to Staged Changes, type a message in the box at the top, and press Ctrl+Enter to commit. Every commit gets a unique ID (a hash like a3f9c2d) that Git uses to identify that snapshot internally.

What are branches

A branch is an independent line of work. Changes on a branch do not affect your main code until you deliberately merge them. For Power BI and Fabric developers, this means one person can build a new measure group while another redesigns the executive page or modifies a pipeline; both lines of work proceed in parallel, on the same project, without either person overwriting the other.

Git branch graph — two developers, one project
mainfeature/margin-measuresfeature/executive-pagebranchbranchmergemergea1b2c3e4f5g6h7i8j9

Two developers work on separate branches simultaneously. main stays stable throughout. Each branch merges back only when the work is ready to ship.

Branch for every meaningful change
New measure or measure group
New report page or visual
Changes to the data model schema
Any work driven by an AI coding agent

Name branches clearly: feature/margin-measures beats test1 every time.

Remote and local

Every developer keeps a full copy of the repository on their own machine — that is the local repository. The remote is the cloud copy hosted on GitHub or Azure DevOps. It is the shared version everyone synchronises with. After committing locally, you push your changes to the remote; your teammates pull from it to get your latest work.

What are remotes

A remote is simply a named URL pointing to a repository hosted on another server. When you clone a repository, Git automatically creates a remote called origin pointing back to the source. Most teams work with one remote. When VS Code shows ↑1 in the status bar, it means you have one local commit ready to push to origin.

Local repository vs. remote host
Your machineLocal repo(.git folder)VS CodeGit hostRemote repoGitHub /Azure DevOpscloud ☁TeammateLocal repo(.git folder)VS Codepushpullpullpush

Every developer keeps a full copy of the repository on their own machine. The Git host is the shared version everyone synchronises with via push and pull.

What is checking out

Checking out a branch means switching your working environment to that branch. When you do it, VS Code updates all your open files to reflect the state of that branch. Changes you made on another branch disappear from view; they are safe on their own branch, just not visible until you switch back.

The current branch is always shown in the bottom-left status bar in VS Code. Click it to open the branch picker, select a branch, and VS Code switches instantly. To create a new branch and switch to it in the same step, type a new name in the picker and choose Create new branch.

Tip

When you clone or fetch a repository, Git downloads references to remote branches — branches that live on GitHub or Azure DevOps. They appear prefixed with origin/. To work on one, click the status bar, pick it from the list, and VS Code automatically creates a local tracking branch for you. After that, the status bar also shows whether you are ahead or behind the remote (e.g. ↑1 ↓2).

Does Git lock files?

No. This surprises many people coming from SharePoint, SVN, or Perforce, where “checking out” a file locks it so nobody else can edit it. Git works completely differently.

Checkout in Git vs. other tools
TopicSVN / SharePointGit
What “checkout” doesLocks the file for youSwitches your local context
Can others edit the same file?No — they are blockedYes, freely
When are conflicts handled?Prevented upfront by lockingResolved after the fact by merge
Works offline?NoYes — commit locally, push later

Two people can edit the same file at the same time. Git sorts it out at merge time, not before.

How work gets back to main

When a feature branch is ready, you bring it into main — the shared, stable version of the project — through merging. Git compares both branches and combines the changes. If two people edited different files, the merge is automatic. If they edited the same lines of the same file, Git flags a conflict for you to resolve manually before the merge completes.

On a shared team repo, the standard path is a pull request (PR): a proposal to merge your branch, made through GitHub or Azure DevOps. Opening a PR lets reviewers see the exact diff, leave comments, and approve before anything reaches main. On a solo project you can merge directly in VS Code. Who reviews a PR on a BI team? Typically another report developer, the semantic model owner, a tech lead, or the workspace owner.

SituationWhat to do
Solo project or personal repoMerge locally in VS Code — no reviewer needed.
Shared team repoOpen a PR on GitHub or Azure DevOps.
Branch protection enforcedA PR is required; Git rejects direct pushes to main.

When in doubt on a shared repo, open a PR. It takes thirty seconds and gives everyone visibility.


Putting it together: a Power BI Project in Git

This walkthrough uses a local .pbip folder. Fabric workspace Git integration follows the same concepts — the commit and branch controls just live inside the Fabric browser interface instead of VS Code.

Step 0 — get a repository (once only)
1
Open the PBIP folder in VS CodeFile → Open Folder → select your SalesAnalysis/ folder. VS Code shows the full project tree. Keep Power BI Desktop closed for now.
2
Initialize + first commitSource Control panel (Ctrl+Shift+G) → Initialize Repository → accept the .gitignore offer → click + next to Changes to stage everything → type "Initial commit: SalesAnalysis project" → Ctrl+Enter.
3
Publish BranchClick Publish Branch in the Source Control panel. VS Code opens a browser to authenticate and creates the remote repository. The sync arrows now handle push and pull going forward.
THEN, FOR EVERY CHANGE
The daily loop — click any step
Start from latest main
Click the sync arrows (↓) in the VS Code status bar before you touch anything. This ensures your new branch starts from your teammates' latest work, not an old version that is already behind.
1 / 7

The diagram above is the map. The sections below are the same journey, step by step, with the extra context you need when you actually do the work.

Where should your repo folder live?

Keep your repository in a normal local folder such as C:\Repos\SalesAnalysis. Avoid placing it inside a OneDrive or SharePoint-synced folder — both Git and OneDrive will try to manage the same files at the same time, which causes conflicts and data loss.

1. Pull: start from the latest main

Before branching, always click the sync arrows (↓) in the VS Code status bar to pull the latest main. This ensures your new branch starts from your teammates’ most recent work, not a version that is already behind.

2. Branch: create a safe place to work

Say you need to add a new Margin % measure. In VS Code, click the branch name in the bottom-left corner and select Create new branch. Name it feature/margin-measures. You are now working in isolation; the main branch is untouched.

3. Edit: Desktop or VS Code

There are two valid ways to make the actual change. Use the one that fits the work.

Power BI Desktop path: open the .pbip project in Power BI Desktop, make the report or model change visually, and save in Desktop. This is the natural path for most report authors.

VS Code path: edit the PBIP text files directly, or use an LLM/MCP-assisted workflow that edits those files for you. This is useful when you are comfortable reviewing text changes, generating measures, or applying structured edits.

Either way, once the file is saved, VS Code’s Source Control icon shows a badge and the changed files appear under Changes. Review the diff before you stage anything.

Power BI Desktop and Git

When editing in Power BI Desktop: you can commit while Desktop has the project open, but close Desktop before switching branches or pulling changes that affect model or report files. Desktop holds the model in memory; if Git changes files on disk while it is open, Desktop may show stale data or throw load errors on the next save. When editing directly in VS Code, this concern does not apply — there is no second application holding the model in memory.

4. Stage: choose what belongs in this commit

Stage the files that belong in this specific change. In VS Code’s Source Control panel, click the + next to the changed file to move it from Changes to Staged Changes.

Staging does not change the file. It only marks it for the next commit. If you changed a Margin % measure and also experimented with a page title, you can stage only the measure and leave the title unstaged for later.

5. Commit: save the snapshot

Type a descriptive message in the Source Control message box and press Ctrl+Enter. For the Margin % example, use something like:

Add Margin % measure to Sales table

After committing, your work exists in Git history, but only on your machine. Nobody else has it yet.

6. Push & PR: share the branch

Push publishes your local commit to the cloud repository. Use the sync arrows or the Publish Branch button in VS Code. The up arrow (↑) means you have local commits waiting to push; the down arrow (↓) means teammates have pushed commits you have not pulled yet.

When the work is ready, the next step depends on whether this is a personal project or a shared team repo.

Solo or personal repo: Click the branch name in the VS Code status bar, switch back to main, open the ... menu, select Branch → Merge Branch, and choose feature/margin-measures. Your measure is now part of main.

Shared team repo: Push the branch and open a PR. A teammate can review the diff and approve before anything touches main.

7. Merge: land the change on main

After the PR is approved, merge it into main. Your Margin % measure is now part of the shared, stable version of the project.

For the next change, pull main, create a new branch, and repeat the loop.

You can stop here

If you can pull, branch, make a change (in Desktop or VS Code), stage, commit, and push — you already have the core loop. The sections below cover team scenarios (conflicts, PR reviews) and habits. Come back when you need them.

When conflicts appear

A merge conflict happens when two people edit the same lines of the same file and Git cannot decide which version to keep. For .pbip projects, this most often happens in model definition files when two people modify the same table or measure at the same time. In Fabric, the same applies to shared semantic models or notebooks. Because both formats store content as readable text, Git can show you exactly where the disagreement is.

A merge conflict is not a failure. It is Git doing its job, flagging a decision that requires a human. The fewer lines each commit touches, the less often conflicts appear.

What a conflict looks like in VS Code

VS Code’s merge editor shows the conflict as two panels: Current Change (your version) and Incoming Change (the other person’s version). Choose which to keep, combine both, then commit the resolution.

Two versions of the same measure — you choose which to keep
Current Change (your version)Margin % = DIVIDE( [Gross Margin], [Revenue] )Incoming Change (teammate)Margin % = DIVIDE( [Net Margin], [Revenue] )!You choose one, then commit the resolutionResolvedMargin % = DIVIDE( [Gross Margin], [Revenue] )→ commit: "Resolve Margin % conflict"

Git shows both versions side by side. Pick one (or combine), delete the conflict markers, and commit. If the right answer is not obvious, ask the teammate who made the incoming change — it is often a business-rule decision, not a technical one.

When the right answer is not obvious from the diff, ask the teammate who made the incoming change — many conflicts are business-rule decisions, not technical ones.

Before you push: reduce conflict risk
Are you working on a separate branch?
Have you pulled the latest changes from main?
Are your changes focused on one part of the model?
Have you communicated with teammates before editing shared files?

If two people never edit the same file at the same time, merge conflicts are rare.


The habit that matters more than the tool

Git rewards one behaviour above all else: small, frequent, well-described commits.

A commit message is a note to your future self. “Updated model” tells you nothing six months later. “Add Margin % measure to Sales table” tells you exactly what changed and where to look. Write the message as if explaining the change to a colleague who was not in the room when you made it.

Commit message quality
Badupdates
OKupdate sales report
GoodAdd Margin % measure to Sales table

This habit matters even more when AI coding agents are part of your workflow. An agent can write ten measures in thirty seconds. Without Git, you have no easy way to review what it did, compare it against what you expected, or undo the parts you do not want. With Git, each agent-generated change becomes a commit you can read, a diff you can inspect, and a rollback point if something breaks. The agent works fast; Git keeps you in control.

One last habit worth building early: never commit secrets or credentials into a Git repository. BI projects often include connection strings, service principal credentials, or API keys in local configuration files. Add those files to .gitignore before your first commit; once a secret is committed and pushed, assume it is compromised even if you delete it later.

The goal is not to master every Git feature before you start. It is to start, make mistakes in a controlled environment where everything is recoverable, and build the habit gradually. The first repository teaches you more than any documentation.


Common beginner mistakes

Watch out for these
Editing directly on main — always create a branch first, even on a solo project.
Forgetting to pull before starting — your new branch starts from stale code and conflicts pile up.
Committing secrets or credentials — add config files with passwords or API keys to .gitignore before the first commit.
Switching branches while Power BI Desktop is open — Desktop holds the model in memory; close it before switching branches or pulling. Not an issue when editing via VS Code with an LLM or MCP.
One giant commit with unrelated changes — small, focused commits are easier to review, revert, and understand six months later.

Quick glossary

TermPlain-language meaning
RepositoryThe folder Git is tracking, including its full history
CommitA named snapshot of staged files at a point in time
StagingMarking specific files as ready for the next commit
BranchAn independent line of work that does not affect main until merged
CheckoutSwitching your working environment to a different branch
RemoteThe cloud copy of the repository (on GitHub or Azure DevOps)
PushUpload your local commits to the remote
PullDownload the remote’s latest commits to your local copy
MergeCombine one branch’s commits into another
Pull request (PR)A proposal to merge a branch, reviewed by the team before it lands
HashA short unique ID (like a3f9c2d) that Git assigns to each commit — think of it as a receipt number

Where to go next:

Comments

Share your take or ask a question below.