-
Notifications
You must be signed in to change notification settings - Fork 1
Get‑GitTag
Retrieves Git tags based on specified parameters.
Get-GitTag [[-Name] <String>] [-First <UInt32>] [-AsVersions] [-Descending]
[<CommonParameters>]
Get-GitTag [-Latest] [<CommonParameters>]
The Get-GitTag function retrieves Git tags based on the specified parameters. It can retrieve the latest tag, a specific tag by name, or a list of tags. The function supports sorting and filtering options.
Get-GitTag -Name 'v1.0'
Retrieves the Git tag with the name 'v1.0'.
Get-GitTag -Latest
Retrieves the latest Git tag.
Get-GitTag -Name 'v13*' -AsVersions -Descending
Retrieves all Git tags as versions that start with 'v13', and sort them in descending order.
Get-GitTag -First 5 -AsVersions -Descending
Retrieves the first 5 Git tags as version numbers after the tags are sorted in descending order.
Specifies whether to retrieve tags as version numbers. This parameter is used in the 'First' parameter set.
Type: SwitchParameter
Parameter Sets: First
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies whether to sort the tags in descending order. This parameter is used in the 'First' parameter set. Default is ascending order.
Type: SwitchParameter
Parameter Sets: First
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseRetrieves the latest Git tag. This parameter is used in the 'Latest' parameter set.
Type: SwitchParameter
Parameter Sets: Latest
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the tag to retrieve. This parameter is used in the 'First' parameter set.
Type: String
Parameter Sets: First
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the number of tags to retrieve. This parameter is used in the 'First' parameter set.
Type: UInt32
Parameter Sets: First
Aliases:
Required: False
Position: Named
Default value: 0
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.
- 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