Skip to content

Assert‑GitLocalChange

viscalyxbot edited this page Sep 30, 2025 · 1 revision

SYNOPSIS

Asserts that there are no unstaged or staged changes in the local Git branch.

SYNTAX

Assert-GitLocalChange [<CommonParameters>]

DESCRIPTION

The Assert-GitLocalChange command checks whether there are any unstaged or staged changes in the local Git branch. If there are any staged or unstaged changes, it throws a terminating error.

EXAMPLES

EXAMPLE 1

Assert-GitLocalChange

This example demonstrates how to use the Assert-GitLocalChange command to ensure that there are no local changes in the Git repository.

PARAMETERS

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

None

This function does not accept pipeline input.

OUTPUTS

None

This function does not return any output.

NOTES

This function requires Git to be installed and accessible from the command line. The function will throw a terminating error if any staged or unstaged changes are detected in the repository.

RELATED LINKS

Clone this wiki locally