github / github/gh-stack

`gh stack rebase -i` - allow interactive rebasing

Đang mở
#151 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
feature request topic: cli - rebase
Ngôn ngữ chính
Go
Star
1.5k
Fork
70
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
7

Mô tả

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`.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, go
Lĩnh vực
cli
Loại issue
Tính năng
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
48/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.