-
Notifications
You must be signed in to change notification settings - Fork 1
Remove‑GitTag
Removes Git tags from local repository and/or remote repositories.
Remove-GitTag [-Tag] <String[]> [-Remote <String[]>] [-Local] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
The Remove-GitTag command removes Git tags from the local repository and/or one or more remote repositories. It supports removing multiple tags and handling multiple remotes in a single operation.
Remove-GitTag -Tag 'v1.0.0'
Removes the tag 'v1.0.0' from the local repository.
Remove-GitTag -Tag 'v1.0.0' -Remote 'origin'
Removes the tag 'v1.0.0' from the 'origin' remote repository.
Remove-GitTag -Tag 'v1.0.0' -Remote 'origin', 'upstream'
Removes the tag 'v1.0.0' from both 'origin' and 'upstream' remote repositories.
Remove-GitTag -Tag 'v1.0.0' -Local -Remote 'origin'
Removes the tag 'v1.0.0' from both the local repository and the 'origin' remote.
Remove-GitTag -Tag @('v1.0.0', 'v1.1.0') -Remote 'origin', 'my'
Removes multiple tags from multiple remotes.
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: FalseSpecifies that the tag should be removed from the local repository. When neither Remote nor Local is specified, Local is assumed.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the remote repository or repositories from which to remove the tag(s). This parameter accepts an array of strings to support removing from multiple remotes.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the tag or tags to remove. This parameter is mandatory and accepts an array of strings to support removing multiple tags.
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts 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: FalseShows 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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
This function requires Git to be installed and accessible from the command line. The function will fail if there are any Git errors during tag removal.
When only the Tag parameter is specified, the tag will be removed from the local repository (equivalent to specifying -Local).
- Assert-GitLocalChange
- Assert-GitRemote
- Assert-IPv4Address
- Clear-AnsiSequence
- ConvertTo-AnsiSequence
- ConvertTo-AnsiString
- ConvertTo-DifferenceString
- ConvertTo-RelativePath
- Disable-CursorShortcutCode
- Get-ClassAst
- Get-ClassResourceAst
- Get-GitBranchCommit
- Get-GitLocalBranchName
- Get-GitRemote
- Get-GitRemoteBranch
- Get-GitTag
- Get-LinkLayerAddress
- Get-ModuleByVersion
- Get-ModuleFileSha
- Get-ModuleVersion
- Get-NumericalSequence
- Get-PSReadLineHistory
- Get-TextOffset
- Install-ModulePatch
- Invoke-Git
- Invoke-PesterJob
- New-GitTag
- New-SamplerGitHubReleaseTag
- Out-Difference
- Pop-VMLatestSnapshot
- Push-GitTag
- Receive-GitBranch
- Remove-GitTag
- Remove-History
- Remove-PSHistory
- Remove-PSReadLineHistory
- Rename-GitLocalBranch
- Rename-GitRemote
- Request-GitTag
- Resolve-DnsName
- Resume-GitRebase
- Send-WakeOnLan
- Split-StringAtIndex
- Start-GitRebase
- Stop-GitRebase
- Switch-GitLocalBranch
- Test-FileHash
- Test-GitLocalChanges
- Test-GitRemote
- Test-GitRemoteBranch
- Test-IPv4Address
- Update-GitLocalBranch
- Update-RemoteTrackingBranch