git-branchless-switch(1)
| git-branchless-switch(1) | General Commands Manual | git-branchless-switch(1) |
NAME
switch - Switch to the provided branch or commit
SYNOPSIS
switch [-i|--interactive] [-c|--create] [-f|--force] [-m|--merge] [-d|--detach] [-h|--help] [TARGET]
DESCRIPTION
Switch to the provided branch or commit
OPTIONS
- -i, --interactive
- Interactively select a commit to check out
- -c, --create <BRANCH_NAME>
- When checking out the target commit, also create a branch with the provided name pointing to that commit
- -f, --force
- Forcibly switch commits, discarding any working copy changes if necessary
- -m, --merge
- If the current working copy changes do not apply cleanly to the target commit, start merge conflict resolution instead of aborting
- -d, --detach
- If the target is a branch, switch to that branch and immediately detach from it
- -h, --help
- Print help (see a summary with '-h')
- [TARGET]
- The commit or branch to check out. If not provided, defaults to the
current commit.
If a revset is provided, it must evaluate to set with exactly 1 head.
If this is provided and the `--interactive` flag is passed, this text is used to pre-fill the interactive commit selector.
| switch |
