Interface Branch

Representation of a Git branch.

interface Branch {
    name: string;
    nameWithoutRemote: string;
    remote?: string;
    tip: Commit;
    type: BranchType;
    upstream?: string;
    upstreamWithoutRemote?: string;
}

Properties

name: string

The short name of the branch. For instance; master.

nameWithoutRemote: string

The name of the branch without the remote prefix. If the branch is a local branch, this is the same as its name.

remote?: string

The name of the remote of the upstream.

tip: Commit

The commit associated with this branch.

The type of branch. Could be either local or remote.

upstream?: string

The remote-prefixed upstream name. For instance; origin/master.

upstreamWithoutRemote?: string

The name of the branch's upstream without the remote prefix.