Skip to content

getUpstream

Return the reference supporting the remote tracking branch, given a local branch reference.

Signature

ts
class Branch {
  getUpstream(): Branch;
}

Returns

  • Branch

    The reference supporting the remote tacking branch.

Errors

  • Error

    Throws error if upstream does not exist.

Released under the MIT License.