git-branchless-switch(1)

git-branchless-switch1

Switch to the provided branch or commit

Usage

switch [{-i | --interactive}] [{-c | --create}] [{-f | --force}] [{-m | --merge}] [{-d | --detach}] [{-h | --help}] [TARGET]

Overview

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.

From git-branchless 0.11.1-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.