Skip to content

getCommit ​

Lookup a reference to one of the commits in a repository.

Signature ​

ts
class Repository {
  getCommit(oid: string): Commit;
}

Parameters ​

  • oidrequired · string

    Commit ID(SHA1) to lookup.

Returns ​

  • Commit

    Commit instance found by oid.

Errors ​

  • Error

    Throws error if the commit does not exist.

Released under the MIT License.