From c07f4dce279ac31d1e8138981bd2d4108d61a4b0 Mon Sep 17 00:00:00 2001 From: Jubarte Date: Fri, 10 Jul 2026 16:22:06 -0300 Subject: [PATCH] fix: update cli help text for checkout command --- scripts/cli.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/cli.ts b/scripts/cli.ts index fd2a7fc..dc93ae7 100644 --- a/scripts/cli.ts +++ b/scripts/cli.ts @@ -15,7 +15,7 @@ * branch b checkout -b -> add -> commit -> push -u * merge [dst] m [d] add -> commit -> checkout dst -> merge -> push * save s add -> commit -> checkout main - * switch sw checkout + * checkout ck git checkout (sw alias) * remote r init -> remote add origin -> first push * restore [file] rs [file] git restore . (or one file) — destructive * model [slug] mo [slug] show or switch the AI model @@ -741,6 +741,8 @@ const SHORT_CMDS: Record = { b: "branch", m: "merge", s: "save", + ck: "switch", + checkout: "switch", sw: "switch", r: "remote", rs: "restore", @@ -1038,7 +1040,7 @@ function helpText(): string { ["branch [-m]", "b [-m]", "new branch → add → commit → push -u"], ["merge [dst] [-m]", "m [dst]", "commit → checkout dst|main → merge → push"], ["save [-m]", "s [-m]", "commit current work, then checkout main"], - ["switch ", "sw ", "checkout "], + ["checkout ", "ck ", "git checkout "], ["remote [-m]", "r [-m]", "git init → remote add origin → first push"], ["restore [file] [-y]", "rs [file] [-y]", "discard changes (all, or one file)"], ["model [slug]", "mo [slug]", "show or switch the AI model"], @@ -1237,8 +1239,8 @@ async function main() { case "switch": { const target = arg1; - if (!target) die('branch name required — e.g. gg sw main (or gitgen switch main)'); - banner(`switch to ${target}`); + if (!target) die('branch name required — e.g. gg ck main (or gitgen checkout main)'); + banner(`checkout ${target}`); await runSteps(async () => { await git(["checkout", target]); });