Skip to content

getObject ​

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

Signature ​

ts
class Repository {
  getObject(oid: string): GitObject;
}

Parameters ​

  • oidrequired · string

    Git object ID(SHA1) to lookup.

Returns ​

  • GitObject

    Git object.

Errors ​

  • Error

    Throws error if the object does not exist.

Released under the MIT License.