Skip to content

gh stack rebase -i - allow interactive rebasing #151

Description

@wmcnamee-coreweave

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions