Feature Request: Add `gh stack split` to split the current branch at a chosen commit
- 主要語言
- Go
- 星號
- 1.5k
- 分支
- 70
- 平均合併
- 1 天 8 小時
- 30 天內合併 PR
- 7
描述
## Problem
A branch often grows into two or more reviewable concerns, splitting these after the fact is tedious
Today it requires a manual operation: insert 1 PR above, cherry pick commits from PR1 to new PR2, rebase
If more than 1 split is required, it's even more error prone manipulations
## Proposal
`gh stack split [] [--at ]`
- Current branch keeps commits up to ``
- `` and commits above move to ``, inserted **directly above** the current branch in the stack (if some PR are already stacked above current PR)
- Branches already above are rebased onto the new layer; existing PRs keep their identity, the current PR's base is unchanged
Ideally, interactive mode lists the current branch's commits, user picks the split point and types the new branch name: this could happen in the `gh stack modify` view
貢獻指南
研究方向
從現有的 gh stack 命令入口點和 gh stack modify 檢視開始,因為提案建議在那裡整合互動式拆分選擇。定義拆分對目前分支、已經位於其上方的分支以及 pull request 身分的行為,然後驗證 gh stack split 支援指定的分支和提交選項,並保留所述的 stack 關係。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- git, github, go
- 領域
- cli
- Issue 類型
- 功能
- 難度
- 5/5
- 預估耗時
- 一週以上
- 活躍度
- 活躍
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100