~30 min read

Git for Power BI

Version control fundamentals for Microsoft Fabric and Power BI developers

Version Control • Branching • Collaboration • Developer Mode

Scroll to explore

Git

What version control is and why it matters

Overview

Git is the version control system used across the software industry. In this section, you'll learn what Git does, why it matters, and how it helps teams track changes, collaborate, and recover from mistakes.

What is Git

Git is a distributed version control system, meaning we always work on a local copy. It tracks every change to your files, letting teams collaborate, revert mistakes, and maintain a complete history of their work.

Git Basics

Core commands for git

Overview

This section covers the core building blocks of Git. We will look at the basic concepts of commits, repositories, and merges. These are concepts you'll use in every project to save your work, organize your history, and bring changes together.

Commits

A commit is a snapshot of your project at a point in time. Think of it like a save. Each one records exactly what changed, who changed it, and why, building a complete timeline of your work.

Key Concepts
Commit
What A saved snapshot
Contains Changes + message
Think of it as A save point
Repository
What Your project folder
Contains Files + full history
Think of it as A shared drive with memory
Merge
What Combining work
Contains Changes from two branches
Think of it as Bringing work together

Branching

Parallel workstreams and safe experimentation

Overview

In this section, we will review branching. Branching is how to work on features in parallel, while different teams manage different tasks, and keep your main project stable until changes are ready to merge.

What is a Branch

A branch is an independent copy of your codebase. You can add features or fix bugs in isolation, without affecting the main project until you're ready to merge.

Branching Workflow

After we branch, we want to copy to our local machine. Branching lets multiple developers work on different features at the same time, then merge their changes back together when ready.

Sync = Pull + Push. Most Git tools (VS Code, GitHub Desktop, Azure DevOps) offer a single "Sync" button that first pulls the latest remote changes, then pushes your local commits. This keeps both sides aligned with one action.
Branch Strategy

A branch strategy defines how your team organizes branches.

Main Branch

The single source of truth. Always stable, always deployable. All work merges back here.

Branches

Short-lived branches for each piece of work. This can be things like hotfix branches to fix bugs, or feature branches to add changes. Create one, make your changes, merge it back, delete it.

Best Practices

Try not to commit directly to main. Always branch, review, write detailed commit messages, and merge through a pull request.

Common Strategies

There are many branch strategies that vary in complexity. Below are two of the more common.

GitHub Flow
How Simple strategy for small teams
Branches Main is permanent, with temporary feature branches for each piece of work
Best for Most teams, continuous delivery
MAIN FEATURE
Git Flow
How More advanced for bigger teams
Branches Main & Develop are permanent, with temporary branches hotfix, release, and feature
Best for Large teams, scheduled releases
MAIN HOTFIX/* RELEASE/* DEVELOP FEATURE/*
Our recommendation: Start with GitHub Flow. It is simple, well-documented, and works for most Power BI and Fabric teams. Only adopt Git Flow if you need formal release cycles.

Git Overview

Key terms and concepts for working with Git

Overview

This section walks through key Git terminology and concepts, from repositories and commits to branching, pull requests, and hosting platforms like GitHub and Azure DevOps.

Foundations

Repository (Repo)

A repository is a centralized project folder that Git actively tracks. It stores all your files along with the complete history of every change ever made to them. Repositories can exist locally on your computer or remotely on a hosting platform like GitHub.

Remote Repository

A remote repository is a shared copy of the project hosted on a platform like GitHub. It serves as the central source of truth for the team, where everyone pushes their work and pulls updates from.

Local Repository

A local repository is your personal copy of the project stored on your machine. This is where you do your day-to-day work, making changes and committing snapshots before sharing anything with the team.

Commit

A commit is a saved snapshot of your project at a specific point in time. Each commit includes a short message describing what changed, making it easy to understand the history of a project. Commits are the foundation of version control in Git and save to your local repository only.

Staging Area

Before committing, you select which changed files to include. This is called staging. It allows you to group related changes into focused, meaningful commits rather than saving everything at once.

.gitignore

A .gitignore file specifies which files and folders Git should not track. This typically includes sensitive files like credentials, large data files, operating system files, and auto-generated content that does not belong in the repository.

Working with Remote Repositories

Push

Pushing uploads your local commits to the remote repository, making your work visible to the rest of the team. Changes remain local until they are pushed.

Pull

Pulling downloads the latest changes from the remote repository to your local machine. This keeps your local copy in sync with work that other contributors have pushed.

Sync

Usually, we don't push and pull individually. Syncing performs a pull and push together, bringing your local and remote repositories into alignment. Most Git desktop applications have this as one action.

Conflict

A conflict occurs when two branches contain competing changes to the same part of a file and Git cannot automatically determine which version to keep. Conflicts must be resolved manually before a merge can be completed.

Clone

Cloning creates a complete local copy of a remote repository on your machine. This is typically the first step when joining an existing project.

Fork

A fork is a personal copy of someone else's repository, hosted under your own account. Forking is common in open source workflows where contributors do not have direct write access to the original project.

Branching

Branch

A branch is an independent copy of your project where changes can be made without affecting the main version. The default branch is typically called "main". Branches allow multiple contributors to work simultaneously without interfering with each other's progress.

Merge

Merging combines the work from one branch into another. Once work on a feature branch is complete, it gets merged back into the main branch, incorporating those changes into the official project.

Pull Request (PR)

A pull request is a request to merge one branch into another, typically accompanied by a team review before the changes are accepted. It is not a native Git command, but a collaboration feature offered by platforms like GitHub. Pull requests are the standard workflow for reviewing and approving contributions.

Services
Process

Git

The underlying version control system. Open-source and runs locally on your machine. Git tracks changes, manages branches, and maintains a complete history of your project. Git is the engine, GitHub and Azure DevOps are built on top of it.

Service

GitHub

A cloud platform owned by Microsoft that hosts Git repositories. GitHub adds collaboration features like pull requests, issues, code review, and CI/CD through GitHub Actions. It is the most widely used Git hosting service in the world.

Service

Azure DevOps

Microsoft's enterprise DevOps platform. Includes Azure Repos for Git hosting, Azure Pipelines for CI/CD, and Azure Boards for project tracking. It includes many services outside Git, including project management and testing. It integrates natively with Microsoft Fabric.

Git Workflow Example

End-to-end workflow using git

Git Workflow

The flow of git can vary from team to team based on your strategy. Below is an example end to end flow, with multiple teams adding features simultaneously.

1Checkout Branch

Switch to the branch you want to work on. This tells Git which line of development you are contributing to.

2Clone to Local

Create a complete local copy of the remote repository on your machine. This is your private workspace, all changes start here.

3Sync to Remote

Commit your changes locally, then sync to push those commits to the shared remote branch, and pull any new changes others have made.

4Pull from Main

Periodically pull the latest changes from main into your feature branch. This keeps your branch current and reduces merge conflicts later.

5Merge to Main (Pull Request)

When your work is complete, open a pull request to merge your branch into main. This triggers a review before changes are accepted into the official project.

MAIN BRANCH A BRANCH B Pull Request pull Pull Request push sync 1. Hello 2. world 3. bye 1. Hello 2. world 3. bye 1. Hello 2. world 3. toodles 1. Hey 2. planet 3. toodles 1. Hello 2. world 3. bye 1. Hello 2. planet 3. bye 1. Hey 2. planet 3. bye 1. Hey 2. planet 3. toodles 1. Hello 2. world 3. bye 1. Hello 2. world 3. toodles Dave (Local) Git DB commit 1. Hello 2. planet 3. bye My (Local) Git DB commit 1. Hey 2. planet 3. bye

Git and Power BI

Version control for Microsoft Fabric and Power BI

Overview

This section shows how Git integrates with Power BI through Developer Mode, enabling version control, collaboration, and code review for your reports and semantic models.

Developer Mode

Power BI Developer Mode saves your report as a PBIP project folder instead of a single .pbix file. This unpacks your model and report into human-readable text files (JSON definitions, TMDL measures, and layout metadata) that Git can track line by line.

Power BI Desktop Developer Mode
saves as
PBIP
Dataset Tables, measures ..
Report Pages, visuals ..
tracked by
Git Repository Version Control
Why it matters: A .pbix file is a compressed binary. Git can't see what changed inside it. Developer Mode produces text files that enable meaningful diffs, pull requests, and collaborative code review for your Power BI projects.
Power BI Git Workflow

See how Power BI Desktop, Git, and Azure DevOps work together, from saving as a PBIP project to committing and syncing with your team through a shared remote repository.

1 / 7