-
Notifications
You must be signed in to change notification settings - Fork 1
Get‑GitRemoteBranch
Retrieves the names of remote Git branches.
Get-GitRemoteBranch [[-RemoteName] <String>] [-RemoveRefsHeads]
[<CommonParameters>]
Get-GitRemoteBranch [-RemoteName] <String> [[-Name] <String>] [-RemoveRefsHeads]
[<CommonParameters>]
The Get-GitRemoteBranch command retrieves the names of remote Git branches from the specified remote repository. It supports filtering by branch name patterns and can optionally remove the 'refs/heads/' prefix from branch names.
Get-GitRemoteBranch -RemoteName 'origin'
Retrieves all remote branches from the 'origin' remote repository.
Get-GitRemoteBranch -RemoteName 'origin' -Name 'feature/*'
Retrieves all remote branches from 'origin' that match the pattern 'feature/*'.
Get-GitRemoteBranch -RemoteName 'origin' -Name 'main' -RemoveRefsHeads
Retrieves the 'main' branch from 'origin' with the 'refs/heads/' prefix removed.
Specifies the name or pattern of the branch to retrieve. Supports wildcard patterns.
Type: String
Parameter Sets: Name
Aliases:
Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the remote repository to query for branches. If not provided, uses the default remote.
Type: String
Parameter Sets: Default
Aliases:
Required: False
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseType: String
Parameter Sets: Name
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseWhen specified, removes the 'refs/heads/' prefix from the returned branch names.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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