Skip to content

Push‑GitTag

viscalyxbot edited this page Sep 30, 2025 · 1 revision

SYNOPSIS

Pushes a Git tag to a remote repository.

SYNTAX

AllTags (Default)

Push-GitTag [[-RemoteName] <String>] [-Force] [-WhatIf] [-Confirm]
 [<CommonParameters>]

SingleTag

Push-GitTag [[-RemoteName] <String>] [[-Name] <String>] [-Force] [-WhatIf]
 [-Confirm] [<CommonParameters>]

DESCRIPTION

The Push-GitTag function is used to push a Git tag to a remote repository. It supports pushing a specific tag or pushing all tags.

EXAMPLES

EXAMPLE 1

Push-GitTag

Pushes all tags to the default remote ('origin') repository.

EXAMPLE 2

Push-GitTag -Name 'v1.0.0'

Pushes the 'v1.0.0' tag to the default ('origin') remote repository.

EXAMPLE 3

Push-GitTag -RemoteName 'my' -Name 'v1.0.0'

Pushes the 'v1.0.0' tag to the 'my' remote repository.

EXAMPLE 4

Push-GitTag -RemoteName 'upstream'

Pushes all tags to the 'upstream' remote repository.

PARAMETERS

-Force

Forces the operation to proceed without confirmation prompts when similar to -Confirm:$false.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Name

Specifies the name of the tag to push. This parameter is optional; if left out, all tags are pushed.

Type: String
Parameter Sets: SingleTag
Aliases:

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

-RemoteName

Specifies the name of the remote repository. The default value is 'origin'.

Type: String
Parameter Sets: (All)
Aliases:

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

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
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

This function requires Git to be installed and accessible from the command line.

RELATED LINKS

Clone this wiki locally