git-branchless-switch(1)

πŸ“¦
version 0.11.1 Β· 2 versions
, in arch rolling, nixpkgs unstable

✨ NAME ✨

switch β€” switch to the provided branch or commit πŸ’…

This is the git-branchless-switch(1) page from the General Commands Manual, and bestie, it’s giving β€œsmall command, big checkout energy.” πŸ¦‹

πŸ¦‹ SYNOPSIS πŸ¦‹

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

πŸ’– DESCRIPTION πŸ’–

Switch to the provided branch or commit. That’s the whole main-character job, no cap. ✨

πŸŽ€ 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. New branch, who dis? 🌸
  • -f, --force β€” forcibly switch commits, discarding any working copy changes if necessary. Careful, bestie β€” that can discard working copy changes when necessary. πŸ’€
  • -m, --merge β€” if the current working copy changes do not apply cleanly to the target commit, start merge conflict resolution instead of aborting. Conflict mode: activated 😭πŸ”₯
  • -d, --detach β€” if the target is a branch, switch to that branch and immediately detach from it. Bye branch attachment πŸ‘‹πŸ’…
  • -h, --help β€” print help (see a summary with '-h'). Yes, that’s exactly what it says 🫢
  • [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. Exactly one head, no ensemble cast. πŸ‘‘

If this is provided and the --interactive flag is passed, this text is used to pre-fill the interactive commit selector. Pre-fill slay ✨

🫢 Cute sign-off: the footer here is switch and git-branchless-switch(1) β€” no extra source/version or date line was printed, so that’s the whole footer vibe. Bye bestie! πŸ’–βœ¨
πŸ“¦ where this page comes from