다음을 통해 공유


TfsGitRepositoryRefsCollection.SetHead Method

Given the name of an existing ref in the repository, sets the HEAD pointer for the repository to that ref. If the ref does not exist, a GitRefNotFoundException will be thrown.

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

Syntax

'Declaration
Public Sub SetHead ( _
    requestContext As TeamFoundationRequestContext, _
    refName As String _
)
public void SetHead(
    TeamFoundationRequestContext requestContext,
    string refName
)
public:
void SetHead(
    TeamFoundationRequestContext^ requestContext, 
    String^ refName
)
member SetHead : 
        requestContext:TeamFoundationRequestContext * 
        refName:string -> unit
public function SetHead(
    requestContext : TeamFoundationRequestContext, 
    refName : String
)

Parameters

  • refName
    Type: System.String

    The name of the ref to set as the HEAD for the repository.

.NET Framework Security

See Also

Reference

TfsGitRepositoryRefsCollection Class

Microsoft.TeamFoundation.Git.Server Namespace