FabricTools v0.33.0 Public Preview

Get-FabricGitStatus

Gets the Git status of the items in a Fabric workspace.

Syntax

Parameter set: Default (Default)
Get-FabricGitStatus -WorkspaceId <guid> [-NoWait] [<CommonParameters>]
Parameter set: ChangesOnly
Get-FabricGitStatus -WorkspaceId <guid> -ChangesOnly [-NoWait] [<CommonParameters>]
Parameter set: ConflictsOnly
Get-FabricGitStatus -WorkspaceId <guid> -ConflictsOnly [-NoWait] [<CommonParameters>]

Description

Returns the Git status of a workspace that is connected to Git: the workspace head, the latest remote commit hash and the list of items that changed in the workspace and/or in the remote branch, including conflicts.

By default the full API response is returned with a WorkspaceId property added. With -ChangesOnly or -ConflictsOnly, one flattened object per changed item is returned instead (WorkspaceId, ItemName, ItemType, ObjectId, LogicalId, WorkspaceChange, RemoteChange, ConflictType). These objects can be piped into Invoke-FabricGitCommit to commit selected items only.

Examples

Example 1

Get-FabricGitStatus -WorkspaceId '11111111-1111-1111-1111-111111111111'

Returns workspaceHead, remoteCommitHash and changes of the workspace.

Example 2

Get-FabricGitStatus -WorkspaceId '11111111-1111-1111-1111-111111111111' -ChangesOnly | Format-Table ItemName, ItemType, WorkspaceChange, RemoteChange

Lists the changed items as a table.

Example 3

Get-FabricWorkspace -WorkspaceName 'Sales' | Get-FabricGitStatus -ConflictsOnly

Lists the items in conflict in the 'Sales' workspace.

Parameters

NameTypeReq.Pos.PipelineDescription
-ChangesOnly switch ✓Required Named –

Returns one flattened object per changed item instead of the full response.

Default: False
-ConflictsOnly switch ✓Required Named –

Like -ChangesOnly, but returns only items with a conflict.

Default: False
-WorkspaceIdalias: Id guid ✓Required Named By name

The ID of the workspace. Accepts pipeline input by property name (alias Id).

-NoWait switch Named –

Returns the long-running operation details instead of waiting for it to finish.

Default: False

This cmdlet also supports the common parameters, such as -Verbose and -ErrorAction. See about_CommonParameters.

Inputs

System.Guid

{{ Fill in the Description }}

Outputs

System.Management.Automation.PSCustomObject

{{ Fill in the Description }}

Notes

https://learn.microsoft.com/en-us/rest/api/fabric/core/git/get-status

Requires the workspace Contributor role or higher.

Author: Kamil Nowinski