Skip to content

Assert‑GitRemote

viscalyxbot edited this page Sep 30, 2025 · 1 revision

SYNOPSIS

Checks if the specified Git remote exists locally and throws an error if it doesn't.

SYNTAX

Assert-GitRemote [-Name] <String> [<CommonParameters>]

DESCRIPTION

The Assert-GitRemote command checks if the remote specified in the $Name parameter exists locally. If the remote doesn't exist, it throws an error.

EXAMPLES

EXAMPLE 1

Assert-GitRemote -Name "origin"

This example checks if the Git remote named "origin" exists locally.

PARAMETERS

-Name

Specifies the name of the Git remote to check.

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

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

RELATED LINKS

Clone this wiki locally