branch
Manage branches in the current repo
The branch command allows you to manipulate branches: creating, deleting, and renaming.
Create a branch
To create a new branch, run:
A new branch branch-name
will be created. If the flag -no-checkout
is not passed, the new branch will be
checked out.
The branch_name has to be a unique identifier, not named after any other existing branch.
Uncommitted changes will be transferred to the newly created branch.
Delete a branch
To delete a branch, run:
For convenient autocompletion of the branch name, run the CLI in interactive mode.
This command deletes the branch with the given id as parameter, the ID in this case is the branch’s name.
The –f
flag is optional and suppresses the confirmation dialog for deleting the branch.
Rename a branch
The new name parameter has to be a unique identifier, not previously used for any other branch.