1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
tldr/pages/common/dolt-branch.md

37 lines
768 B
Markdown
Raw Normal View History

2021-03-19 12:51:21 -04:00
# dolt branch
> Manage Dolt branches.
> More information: <https://docs.dolthub.com/cli-reference/cli#dolt-branch>.
2021-03-19 12:51:21 -04:00
- List local branches (current branch is highlighted by `*`):
`dolt branch`
- List all local and remote branches:
`dolt branch {{[-A|--all]}}`
2021-03-19 12:51:21 -04:00
- 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}}`
2021-03-19 12:51:21 -04:00
- Duplicate a branch:
`dolt branch {{[-c|--copy]}} {{branch_name1}} {{branch_name2}}`
2021-03-19 12:51:21 -04:00
- Delete a branch:
`dolt branch {{[-d|--delete]}} {{branch_name}}`
2021-03-19 12:51:21 -04:00
- Display the name of the current branch:
`dolt branch --show-current`