Git Basics for Fabric

Source control, commits, and your safety net

Why Source Control?

❌ Without Source Control

Break something? Can't get it back
Which version is correct?
Who changed this, and why?
No audit trail

✅ With Source Control

Mistakes are reversible
One file, complete history
Every change attributed & timestamped
Full audit trail with commit messages

Source control isn't just for software developers — it's for anyone who creates things that change over time and matter to the business.

The Problem We've All Had

📄 sales_report.pbix
📄 sales_report_v2.pbix
📄 sales_report_FINAL.pbix
📄 sales_report_FINAL_v2.pbix
📄 sales_report_FINAL_v2_fixed.pbix
📄 sales_report_FINAL_v2_fixed_USE_THIS_ONE.pbix

Git solves this: One file, complete history. Every version is preserved with a clear message explaining what changed and why.

What is a Commit?

A snapshot of your work at a specific point in time

Each commit records:

  • What changed (the diff)
  • Who made the change (the author)
  • When it happened (the timestamp)
  • Why it was made (the commit message)

Think of it like a save point in a video game — you can always come back to it.

How Fabric + Git Works

🏢 Fabric Workspace
Lakehouse
Notebook
Semantic Model
Report
Commit →
← Update
🔀 Git Repository
Lakehouse.Lakehouse/
Notebook.Notebook/
Model.SemanticModel/
Report.Report/
  • Commit — push changes from your workspace to Git
  • Update — pull changes from Git into your workspace
  • Fabric serializes each item as files/folders in the repo

Change Tracking in Fabric

When something changes, Fabric tells you:

+
New item — exists in workspace but not yet in Git
Modified — item changed since last commit
Deleted — item removed from workspace but still in Git

These indicators appear in the workspace item list and the Source control panel.

Writing Good Commit Messages

❌ Bad

"fix"
"updates"
"changed stuff"
"WIP"

✅ Good

Fix null pointer in data transformation
Add customer segmentation logic
Update connection string for prod

Tips: Be specific, use present tense, keep the first line short (~50 chars)

Undoing Mistakes

Your safety net: Undo discards uncommitted changes and restores from Git

✅ Last Commit
Working notebook
💥 Your Change
Added broken code
✅ After Undo
Back to working
Scenario Use Undo?
Uncommitted changes you don't want ✅ Yes
Want to start fresh from last commit ✅ Yes
Already committed the changes ❌ No — use Pull Requests (Section 4)

What You'll Do in Section 1

1
Create a Fabric workspace and connect it to Git
2
Create a notebook and make your first commit
3
Make changes, commit again, and view history
4
Practice undoing uncommitted changes

Let's get started!