This documentation is archived and is not being maintained.
TfsGitRepository Class
Visual Studio 2013
This is one of the two core classes to the TFS Git server object model. It represents a repository on a Team Project Collection. You can't new a TfsGitRepository yourself -- create, delete, fork, and acquisition of an existing TfsGitRepository are all done through the TeamFoundationGitRepositoryService's methods. Consumers of this class should not cache TfsGitRepository instances across logical requests.
Namespace: Microsoft.TeamFoundation.Git.Server
Assembly: Microsoft.TeamFoundation.Git.Server (in Microsoft.TeamFoundation.Git.Server.dll)
The TfsGitRepository type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Name | Every Git repository has a name. The name is unique in the scope of the collection. |
![]() | Refs | The collection of refs for this Git repository. This object has multiple methods on it for reading and writing refs to the repository. |
![]() | RepositoryId | A Team Project Collection may contain multiple Git repositories. They are differentiated by their name as well as by their repository ID. |
![]() | TeamProjectUri | The uri for the team project that owns this Git Repository. Currently, a team project can only have one Git Repository |
| Name | Description | |
|---|---|---|
![]() | Dispose | |
![]() | Dispose(Boolean) | |
![]() | Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | We MUST make sure we dispose of the underlying memory mapped files! (Overrides Object.Finalize.) |
![]() | GetDefaultBranch | Get the default branch for this repository as a TfsGitRef. If there is not a default branch, it will return null. |
![]() | GetHashCode | Serves as the default hash function. (Inherited from Object.) |
![]() | GetRepositoryUri | |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | LookupObject | Looks up the Git object with the given object ID (20-byte SHA-1 hash). |
![]() | LookupObjectType | Looks up the Git object type with the given object ID (20-byte SHA-1 hash). |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
![]() | TryLookupObject | Looks up the Git object with the given object ID (20-byte SHA-1 hash). |
![]() | TryLookupObjectType | Looks up the Git object type with the given object ID (20-byte SHA-1 hash). |
Show:
