rtk-ai/rtk

Add rtk git checkout support

已關閉

#1,728 建立於 2026年5月5日

 (2 則留言) (1 個反應) (0 位負責人)Rust (2,914 個分叉)batch import
area:clienhancementgood first issuehelp wantedpriority:medium

倉庫指標

星標
 (48,085 顆星)
PR 合併指標
 (平均合併 11天 1小時) (30 天內合併 45 個 PR)

描述

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.

貢獻者指南