commands.sh

dolt branch

all

Manage Dolt branches.

More info →

Options (4)

-A, --allboolean

List all local and remote branches

Example: dolt branch {{[-A|--all]}}
-m, --moveboolean

Rename a branch

Example: dolt branch {{[-m|--move]}} {{branch_name1}} {{branch_name2}}
-c, --copyboolean

Duplicate a branch

Example: dolt branch {{[-c|--copy]}} {{branch_name1}} {{branch_name2}}
-d, --deleteboolean

Delete a branch

Example: dolt branch {{[-d|--delete]}} {{branch_name}}

Examples (8)

List local branches (current branch is highlighted by `*`)

List all local and remote branches

dolt branch [-A|--all]

Create a new branch based on the current branch

dolt branch branch_name

Create a new branch with the specified commit as the latest

dolt branch branch_name commit

Rename a branch

dolt branch [-m|--move] branch_name1 branch_name2

Duplicate a branch

dolt branch [-c|--copy] branch_name1 branch_name2

Delete a branch

dolt branch [-d|--delete] branch_name

Display the name of the current branch

dolt branch --show-current
made by @shridhargupta | data from tldr-pages