git.branch(branchName)

Checkout to provided branch.

If branch doesn’t exist - create new branch.

Parameters

branchName
string | BranchOptions
required
interface BranchOptions {
  branch: string;
  /**
   * @default true
   */
  force?: boolean;
}

Switch to provided branch. By default creates a branch if it doesn’t exist.

Returns