Option for renaming an existing branch.

interface Rename {
    force?: boolean;
    newName: string;
    oldName?: string;
}

Properties

force?: boolean

If set to true, the allows renaming the branch even if the new branch name already exists. It is false by default.

newName: string

The desired new name of the branch.

oldName?: string

The name of the branch to rename. If not given, then the currently active branch will be renamed.