Skip to main content

Module command_checkout_table

Module command_checkout_table 

Source
Expand description

The complete Git 2.56.0 option tables of git checkout and git switch. What: The complete option tables of git checkout and git switch in Git 2.56.0. Why: Both commands create branches explicitly (-b, -c, --orphan, --track) and implicitly (a name that matches one remote branch). The tables are assembled as Git assembles them: the command’s own rows, then the shared groups (builtin/checkout.c:1786-1847, 2118-2129, 2170-2179).

In TS you’d write (pseudocode):

// export const CHECKOUT_TABLE: readonly OptionSpec[] = [ ... ];

Constants§

CHECKOUT_TABLE
What: git checkout: checkout_options, then the common, switch-branch and checkout-path groups. Some(b'b') with None is an option that has only a letter. Why: -b and -B take the branch name as a value; --track and --recurse-submodules take an attached value only.
DETACH
-d, --detach.
GUESS
--guess, --no-guess.
NEW_BRANCH
checkout -b <branch>, switch -c/--create <branch>.
NEW_BRANCH_FORCE
checkout -B <branch>, switch -C/--force-create <branch>.
ORPHAN
--orphan <new-branch>.
OVERLAY
checkout --overlay, --no-overlay.
PATCH
checkout -p/--patch.
STAGE
checkout -2/--ours and -3/--theirs.
SWITCH_TABLE
What: git switch: switch_options, then the common and switch-branch groups. Why: switch has no path options; -c and -C have long names and can be negated.
TRACK
-t, --track[=(direct|inherit)]; --no-track writes the same variable.