Delen via


TfsGitRepository.GetDefaultBranch Method

Get the default branch for this repository as a TfsGitRef. If there is not a default branch, it will return null.

Namespace:  Microsoft.TeamFoundation.Git.Server
Assembly:  Microsoft.TeamFoundation.Git.Server (in Microsoft.TeamFoundation.Git.Server.dll)

Syntax

'Declaration
Public Function GetDefaultBranch ( _
    requestContext As TeamFoundationRequestContext _
) As TfsGitRef
public TfsGitRef GetDefaultBranch(
    TeamFoundationRequestContext requestContext
)
public:
TfsGitRef^ GetDefaultBranch(
    TeamFoundationRequestContext^ requestContext
)
member GetDefaultBranch : 
        requestContext:TeamFoundationRequestContext -> TfsGitRef
public function GetDefaultBranch(
    requestContext : TeamFoundationRequestContext
) : TfsGitRef

Parameters

Return Value

Type: Microsoft.TeamFoundation.Git.Server.TfsGitRef

.NET Framework Security

See Also

Reference

TfsGitRepository Class

Microsoft.TeamFoundation.Git.Server Namespace