Summary
Provides read-only access to a Git repository.
- Namespace
-
GitVersion
.Git - Interfaces
-
- IDisposable
- Implementing Types
graph BT Type-.->Interface0["IDisposable"]
Type["IGitRepository"] class Type type-node
Implementing0["IMutatingGitRepository"]-.->Type click
Implementing0 "/api/GitVersion.Git/IMutatingGitRepository"
Syntax
public interface IGitRepository : IDisposable
Properties
| Name | Value | Summary |
|---|---|---|
| Branches | IBranchCollection |
Gets the collection of all branches in the repository.
|
| Commits | ICommitCollection |
Gets the collection of all commits reachable from HEAD.
|
| Head | IBranch |
Gets the currently checked-out branch.
|
| IsHeadDetached | bool |
Gets a value indicating whether HEAD is in a detached
state.
|
| IsShallow | bool |
Gets a value indicating whether the repository is a
shallow clone.
|
| Path | string |
Gets the path to the
.git directory.
|
| References | IReferenceCollection |
Gets the collection of all references in the repository.
|
| Remotes | IRemoteCollection |
Gets the collection of configured remotes.
|
| Tags | ITagCollection |
Gets the collection of all tags in the repository.
|
| WorkingDirectory | string |
Gets the path to the working tree root directory.
|
Methods
| Name | Value | Summary |
|---|---|---|
|
DiscoverRepository |
void |
Loads the repository located at
gitDirectory.
|
|
FindMergeBase |
ICommit |
Finds the best common ancestor between
commit and
otherCommit.
|
|
Uncommitted |
int |
Returns the number of files that have been modified but
not yet staged or committed.
|
Extension Methods
| Name | Value | Summary |
|---|---|---|
|
NotNull |
T |
Throws
ArgumentNullException when
value is
null; otherwise returns the
value.
From
CommonExtensions
|