git-integration-operations-cli

Automate Microsoft Fabric Git integration lifecycle operations from CLI environments.

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/paulasilvatech/Fabric-Agentic-SDLC --skill git-integration-operations-cli-paulasilvatech
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: git-integration-operations-cli
Source: https://github.com/paulasilvatech/Fabric-Agentic-SDLC/tree/main/.github/skills/git-integration-operations-cli
Command: npx skills add https://github.com/paulasilvatech/Fabric-Agentic-SDLC --skill git-integration-operations-cli-paulasilvatech

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires ms-fabric-cli, and includes references (resource) components.

What problem does it solve? Connecting Microsoft Fabric workspaces to Git and keeping them in sync involves error-prone REST API calls with long-running operations, stale workspace heads, tenant admin switches, and credential setup that commonly cause 401s, 400s, and failed syncs. ## Core Features & Use Cases - Full Git Lifecycle Automation: Connect, initialize, commit, update-from-Git, check sync status, resolve conflicts, and disconnect workspaces using the Fabric CLI (fab api) with az rest as a fallback. - Service Principal & CI/CD Support: Create Fabric cloud connections holding Azure DevOps or GitHub credentials and run headless sync from Azure DevOps pipelines or GitHub Actions. - Workspace Relations: Link branch workspaces to their base workspaces so lineage appears in the Fabric portal. - Use Case: A data engineer pushes a commit to main in Azure DevOps and a pipeline automatically authenticates a service principal, reads git/status, and runs updateFromGit with PreferRemote conflict resolution to sync the production Fabric workspace. ## Quick Start Connect my Fabric workspace to the main branch of my Azure DevOps repository and commit all current workspace items to Git.

Frequently Asked Questions about git-integration-operations-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I connect a Microsoft Fabric workspace to Git from the command line?▼

Authenticate with fab auth login, then POST to workspaces/{id}/git/connect with the gitProviderDetails (provider type, organization, project, repository, branch, directory). Follow with git/initializeConnection using PreferWorkspace or PreferRemote to set the initial sync direction.

How to automate Fabric Git sync with a service principal?▼

Create a Fabric cloud connection storing the git credentials (ServicePrincipal for Azure DevOps, PAT for GitHub), then pass its id as connectionId in the myGitCredentials block of the connect call. The service principal needs workspace Admin and the tenant switch allowing service principals to create connections.

Does Fabric Git integration support GitHub repositories?▼

Yes, GitHub and GitHub Enterprise are supported, but connecting requires a Personal Access Token stored in a configured connection since GitHub has no automatic credential mode. The GitHub sync tenant switch is disabled by default and must be enabled first.

Why does updateFromGit fail with WorkspaceHeadMismatch?▼

The updateFromGit call requires the workspace's current workspaceHead, and a stale value returns 400 WorkspaceHeadMismatch. Always read git/status immediately before committing or updating, and poll any 202 long-running operation to completion first.

What permissions are needed for Fabric Git operations?▼

Connect and disconnect require workspace Admin, while commit and update require at least Contributor with write permission on all items. The workspace must also be assigned to a capacity, and only one Git operation can run against a workspace at a time.

When should I not use the Fabric Git integration API for deployments?▼

Do not use it for branch switching automation, deployment-pipeline runtime, or tools like fab deploy and fabric-cicd that promote item definitions. Cross-workspace reference rebinding after promotion is a property of the item definition format, not the Git lifecycle.