コンテンツにスキップ

BranchOperations

このコンテンツはまだ日本語訳がありません。

Defined in: src/core/repo.ts:2500

Branch operations

Wraps: git branch subcommands

Methods

create()

create(name, opts?): Promise<void>

Defined in: src/core/repo.ts:2520

Create a new branch

Wraps: git branch <name>

Parameters

name

string

opts?

BranchCreateOpts & ExecOpts

Returns

Promise<void>


current()

current(opts?): Promise<string | null>

Defined in: src/core/repo.ts:2513

Get current branch name

Wraps: git branch --show-current

Parameters

opts?

ExecOpts

Returns

Promise<string | null>


delete()

delete(name, opts?): Promise<void>

Defined in: src/core/repo.ts:2527

Delete a branch

Wraps: git branch -d|-D <name>

Parameters

name

string

opts?

BranchDeleteOpts & ExecOpts

Returns

Promise<void>


list()

list(opts?): Promise<BranchInfo[]>

Defined in: src/core/repo.ts:2506

List branches

Wraps: git branch --list

Parameters

opts?

BranchOpts & ExecOpts

Returns

Promise<BranchInfo[]>


rename()

rename(oldName, newName, opts?): Promise<void>

Defined in: src/core/repo.ts:2534

Rename a branch

Wraps: git branch -m <old> <new>

Parameters

oldName

string

newName

string

opts?

ExecOpts

Returns

Promise<void>