Test-GitTag

Tests if a tag exists in a Git repository.

Syntax

Test-GitTag [[-RepoRoot] <String>] [-Name] <String> [<CommonParameters>]

Description

The `Test-GitTag function tests if a tag exists in a Git repository.

If a tag exists, returns $true; otherwise $false. Pass the name of the tag to check for to the Name parameter.

Parameters

Name Type Description Required? Pipeline Input Default Value
RepoRoot String

Specifies which git repository to check. Defaults to the current directory.

false false (Get-Location).ProviderPath
Name String

The name of the tag to check for.

true false

EXAMPLE 1

Test-GitTag -Name 'Hello'

Demonstrates how to check if the tag 'Hello' exists in the current directory.