`gh stack rebase -i` - allow interactive rebasing
- 主要语言
- Go
- 星标
- 1.5k
- 派生
- 70
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 7
描述
Support `-i` for rebasing stacks.
I ❤️ rebasing, and doing no-edit amends. When I do that in a branch low in the stack, the higher layers end up with "duplicate-ish" commits that conflict. The solution during a normal rebase is to drop that new duplicate. Here's an example
### Initial State
branch-a
`main -> commitA (111aaa)`
branch-b
`main -> commitA (111aaa) -> commitB (222bbb)`
### Change in `branch-a` and `git commit --amend`'d
if I go to `branch-a` and make a change using `git commit --amend` I'll end up with this:
branch-a
`main -> commitA (112aaa)`
branch-b
`main -> commitA (111aaa) -> commitB (222bbb)`
### Finally, rebasing `branch-b`
Then when `branch-b` gets rebased, it looks like this:
`main -> commitA (112aaa) -> commitA (111aaa) -> commitB (222bbb)`
Again, the solution is simply to `drop` `commitA (111aaa)`, as that's the old one.
But I can't do that with `gh stack rebase`.
贡献指南
调研方向
Start at the `gh stack rebase` command and trace how its arguments are handled, then reproduce the stacked-branch example from the issue. The work is done when `gh stack rebase -i` launches interactive rebasing and allows the old duplicate commit to be dropped without producing the duplicate commit in the higher layer.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, go
- 领域
- cli
- Issue 类型
- 功能
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 48/100