github / github/gh-stack

`gh stack rebase -i` - allow interactive rebasing

Aperta
#151 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
feature request topic: cli - rebase
Lingua principale
Go
Stelle
1.5k
Fork
70
Merge medio
1g 8h
PR unite (30g)
7

Descrizione

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

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
git, go
Ambito
cli
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.