GitKraken CLI

gk ai resolve apply

Generate, write, and stage fresh resolutions

Synopsis

Generate fresh resolutions and immediately write and stage them.

This combines plan + apply and uses AI. Prefer gk ai resolve plan followed by apply-plan unless immediate mutation was explicitly authorized. It does not continue, abort, commit, or push the Git operation. Inspect allConflictsResolved and git status afterward.

Example: gk ai resolve apply –file src/a.ts –json gk ai resolve apply –model --file src/a.ts --json

MODEL SELECTION

–model selects a model for this invocation only and does not change saved provider settings. Without it, Resolve uses the active provider's configured model, or the GitKraken backend default when no global override is set.

Run “gk ai provider show” to inspect the active provider and configured model. For GitKraken-hosted AI, “gk ai models” lists available ids and marks the backend default with *. With the GitKraken provider, –model “” bypasses a saved global override once and uses the backend default.

plan, refine-plan, and apply accept –model because they call AI. Repeat the same selection for each refinement or fresh apply when consistency matters. apply-plan replays reviewed bytes without AI and does not accept –model. –fallback-only skips AI, so it cannot be combined with –model; passing both is an error rather than a silently ignored selection. Any model used for Resolve must support tool calling.

gk ai resolve apply [flags]

Options

      --fallback string       Fallback strategy when AI fails or is unavailable: ours or theirs
      --fallback-only         Resolve directly from --fallback without initializing or calling an AI provider
      --file stringArray      Exact repository-relative conflicted path to resolve (repeatable)
  -h, --help                  help for apply
      --instructions string   Guidance for AI resolution
      --max-steps int         Maximum model tool-calling steps per file (default 15)
      --model string          AI model id for this invocation (does not change saved settings)

Options inherited from parent commands

      --json             Emit machine-readable JSON on stdout (GK_OUTPUT=json sets it session-wide)
      --no-telemetry     Disable telemetry (OTel spans, Sentry) for this invocation
      --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 resolve - Plan, review, and stage AI conflict resolutions
Auto generated by spf13/cobra on 16-Sep-2026

© 2023 Axosoft, LLC DBA GitKraken