rtk-ai/rtk

Add rtk git checkout support

Geschlossen

#1.728 geöffnet am 05.05.2026

 (2 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Rust (2.914 Forks)batch import
area:clienhancementgood first issuehelp wantedpriority:medium

Repository-Metriken

Stars
 (48.085 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 11T 1h) (45 gemergte PRs in 30 T)

Beschreibung

Problem

rtk discover shows 617 git checkout invocations in the last 30 days, all unhandled. Common forms:

  • git checkout -b <branch>
  • git checkout <branch>
  • git checkout HEAD -- <files>
  • git checkout -- <files>

Proposal

Compress to the same ok <result> pattern as rtk git add / rtk git commit:

  • git checkout -b feat/xok feat/x (new)
  • git checkout mainok main (or ok main, 3 files updated)
  • git checkout HEAD -- foo.ts bar.tsok 2 files restored
  • On conflict / dirty tree: surface only the conflict/error, not the full status block

Why it matters

Plain git checkout on a branch with diff context can dump dozens of "M / D / ??" lines. Same shape as the existing rtk git pull compression — should be a small extension.

Contributor Guide