Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
08-15-2025 07:27 AM - last edited 08-27-2025 01:30 AM
Tired of manually checking every Fabric workspace to see if it's in sync with the central Git repository? Worried that developers might lose work by accidentally pulling changes over their uncommitted work?
With this accelerator, you can automate the process of safely updating your workspaces from Git!
Big thanks to Michael Kovalsky and the other dedicated developers from semantic link labs for making this functionality possible.
Before running the script, ensure the following is in place:
The script needs to scan all workspaces in your tenant. To do this, the identity running the notebook (either a user or a Service Principal) must have Fabric Tenant Admin permissions or Tenant.Read.All.
The script must be executed in a workspace that is assigned to an active Fabric Capacity (F2, or higher).
The semantic-link-labs library is required. The provided notebook includes a step to install this automatically if it's not already in your environment.
When executed, the Python script performs the following steps:
It begins by listing all workspaces in your Fabric tenant.
It checks the Git status for each workspace to find which ones are behind the remote branch.
It automatically updates workspaces that are behind only if they have no uncommitted local changes. This prevents overwriting any work.
After running, the script provides two important lists:
To run this synchronization process automatically, you can schedule the notebook's execution using:
Use the "Run a notebook" activity to trigger the script on a schedule (e.g., nightly).
Use the Fabric REST APIs to start a notebook run as part of a larger CI/CD workflow.
📚Many online guides are available to help you set up scheduling with either of these tools.
https%3A%2F%2Fgithub.com%2FAsgerLB%2FDataAndDragons%2Ftree%2Fmain%2FFabricAccelerators%2Ffabric-git-sync