Namespaces

Types in GitSharp

Type Commit

Namespace GitSharp

Parent AbstractObject

Represents a revision of the files and directories tracked in the repository.

Methods

Properties

Public instance methods

void Checkout(String[] paths)

Check out the given paths into the working directory. Files in the working directory will be overwritten.

See also to check out paths from the index.
Parameters
String[] paths

Relative paths of the files to check out.

IEnumerable<Change> CompareAgainst(Commit other)

Compares this commit against another one and returns all changes between the two.

Public static methods

IEnumerable<Change> CompareCommits(Commit reference, Commit compared)

Compare reference commit against compared commit. You may pass in a null commit (i.e. for getting the changes of the first commit)

Commit Create(string message, Commit parent, Tree tree, Author author, Author committer, DateTimeOffset time)

Commit Create(string message, Commit parent, Tree tree, Author author)

Commit Create(string message, Commit parent, Tree tree)

Public properties

IEnumerable<Commit> Ancestors get;

Returns an iterator over all ancestor-commits of this commit.

Author Author get;

The author of the change set represented by this commit.

DateTimeOffset AuthorDate get;

Original timestamp of the commit created by Author.

IEnumerable<Change> Changes get;

Returns the changes of this commit vs. it's parent commit(s). Works for the first commit too.

DateTimeOffset CommitDate get;

Final timestamp of the commit, after Committer has re-committed Author's commit.

Author Committer get;

The person who committed the change set by reusing authorship information from another commit. If the commit was created by the author himself, Committer is equal to the Author.

Encoding Encoding get;

The encoding of the commit details.

string Hash get;

bool HasParents get;

True if the commit has at least one parent.

bool IsBlob get;

bool IsCommit get;

bool IsCommittedByAuthor get;

Returns true if the commit was created by the author of the change set himself.

bool IsTag get;

bool IsTree get;

bool IsValid get;

string Message get;

The commit message.

Commit Parent get;

The first parent commit if the commit has at least one parent, null otherwise.

IEnumerable<Commit> Parents get;

Returns all parent commits.

Repository Repository get;

string ShortHash get;

Tree Tree get;

The commit's reference to the root of the directory structure of the revision.