github / github/gh-stack

`gh stack rebase -i` - allow interactive rebasing

Aberta
#151 2 comentários 0 reações 0 responsáveis Ver no GitHub
feature request topic: cli - rebase
Linguagem predominante
Go
Estrelas
1.5k
Forks
70
Merge médio
1d 8h
PRs com merge (30d)
7

Descrição

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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

Comece pelo comando `gh stack rebase` e rastreie como seus argumentos são tratados; em seguida, reproduza o exemplo de branches empilhados da issue. O trabalho estará concluído quando `gh stack rebase -i` iniciar um rebase interativo e permitir descartar o commit duplicado antigo sem produzir o commit duplicado na camada superior.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
git, go
Domínio
cli
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Pouca atividade
Clareza
Razoavelmente clara
Facilidade para iniciantes
48/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.