Feature request: support merge-based stack synchronization without force-pushing
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia tracciando il workflow esistente "Rebase stack" e il comando di sincronizzazione dello stack nella CLI. Mappa come vengono gestiti gli aggiornamenti dei branch, i Force-Pushes, i conflitti, le approvazioni, i checks e i branch protetti. Il lavoro è completato quando una modalità selezionabile basata su Merge sincronizza i branch nell’ordine dello stack senza eseguire Force-Pushes, mentre gli stack esistenti basati su Rebase continuano a funzionare.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Please add an option for stacked pull requests to synchronize branches using merge commits instead of rebasing and force-pushing branch history.
Motivation
Our organization does not allow force-pushes because they rewrite branch history and can make audit trails, approvals, and incident investigation more difficult. The current "Rebase stack" workflow is therefore incompatible with our repository policies.
Proposed behavior
Add a merge-based synchronization mode for stacks:
- When a parent branch changes, merge the parent into each child branch in stack order.
- Preserve existing commits and branch history.
- Do not force-push rewritten branch history.
- Keep the existing rebase behavior as the default or as a selectable repository/stack setting.
- Make the selected synchronization mode visible in the stack UI and CLI.
- Respect branch protection and merge-commit policies.
Example
Given:
main
└── feature-a
└── feature-b
When main advances, merge main into feature-a, then merge the updated feature-a into feature-b, instead of rebasing both branches and force-pushing them.
Acceptance criteria
- A stack can be configured to use merge-based synchronization.
- Synchronizing the stack does not require force-pushing any branch.
- Existing approvals and checks are handled consistently with the merge-based history.
- Conflicts are reported per branch and can be resolved through the normal workflow.
- The behavior works with protected branches that block force-pushes.
- Existing rebase-based stacks continue to work unchanged.
Related issues
- #268: Stacked PR cannot be merged into a merge-queue branch
- #442: gh stack sync pushed a stack branch's merge commit directly onto the trunk branch
- Lingua principale
- Go
- Stelle
- 1.5k
- Fork
- 73
- Merge medio
- 1g 8h
- PR unite (30g)
- 7
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di github/gh-stack
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 92/100
-
feature request topic: cli - general
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
feature request topic: auto-merge
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
bug topic: docs
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 68/100
Tutte le issue di github/gh-stack
Issue simili
-
textual definition
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
geneontology/go-ontology#32653 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
-
needs design
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Priority/High ready-for-agent Severity/Major Type/Bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100