Skip to content

findBranch

Lookup a branch by its name in a repository.

Signature

ts
class Repository {
  findBranch(name: string, branchType: BranchType): Branch | null;
}

Parameters

  • namerequired · string

    A branch name.

  • branchTyperequired · BranchType

    Branch type to lookup.

    - Local : A local branch not on a remote.
    - Remote : A branch for a remote.

Returns

  • null | Branch

    A found branch.

Released under the MIT License.