GitKraken CLI

gk ai compose undo

Undo a previous compose operation

Synopsis

Reverse a previous compose apply or split using the undoId that operation returned. Spends no AI tokens.

gk ai compose undo –list List the undo ids available in this repository. gk ai compose undo –check Report whether undo can run safely. Read-only. gk ai compose undo Perform the undo.

–list and –check never modify the repository. Run –check first when the working tree is dirty: with –output json it returns {safe, blockers, warnings} so you can tell the user exactly what is in the way.

–force pushes past a “branch has new commits” blocker. –force-dirty-workdir pushes past a dirty working tree and may discard uncommitted changes — confirm with the user before using it. Neither flag implies the other; pass both only when both blocker classes should be bypassed.

gk ai compose undo <undo-id> [flags]

Examples


  gk ai compose undo --list
  gk ai compose undo --check <undo-id>
  gk ai compose undo <undo-id>

Options

      --check                 Validate whether undo can safely run without mutating the repository
      --force                 Force undo past branch-has-new-commits blockers
      --force-dirty-workdir   Force undo past dirty-workdir blockers; may discard uncommitted changes
  -h, --help                  help for undo
      --list                  List undo IDs available in this repository

Options inherited from parent commands

      --no-telemetry     Disable telemetry (OTel spans, Sentry) for this invocation
      --output string    Output format: text or json (default "text")
      --session string   (Optional) Isolate auth and cache under a named session
      --workdir string   Path to the git repository to operate on (default: current directory)

SEE ALSO

  • gk ai compose - Plan and create clean, atomic commits from your working tree changes using AI
Auto generated by spf13/cobra on 31-Aug-2026

© 2023 Axosoft, LLC DBA GitKraken