Feature request: support merge-based stack synchronization without force-pushing
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 35/100
調査の方向性
まず、既存の "Rebase stack" ワークフローと CLI の stack 同期コマンドを追跡します。ブランチの更新、Force-Pushes、競合、承認、checks、保護されたブランチがどのように処理されるかを整理します。選択可能な Merge ベースのモードによって、Force-Pushes を行わずに stack の順序でブランチが同期され、既存の Rebase ベースの stack も引き続き動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
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
- 主要言語
- Go
- スター
- 1.5k
- フォーク
- 73
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 7
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/gh-stack のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
feature request topic: cli - general
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
feature request topic: auto-merge
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
bug topic: docs
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
github/gh-stack の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NVIDIA/gpu-operator#2955 ·
-
agentic-workflows
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
kovidgoyal/kitty#10516 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
cisagov/vulnrichment#337 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100