Feature Request: Add `gh stack split` to split the current branch at a chosen commit

オープン
#508 コメント 0 件 リアクション 7 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
git, github, go
領域
cli

調査の方向性

既存の gh stack コマンドのエントリポイントと gh stack modify ビューから始めます。提案では、そこにインタラクティブな分割選択を統合することが示されています。現在のブランチ、すでにその上にあるブランチ、および pull request の識別情報について分割の動作を定義し、その後、gh stack split が指定されたブランチおよびコミットのオプションをサポートし、記載された stack の関係を維持することを確認します。

索引モデルが issue の本文から書いたものです。

説明

Problem

A branch often grows into two or more reviewable concerns, splitting these after the fact is tedious
Today it requires a manual operation: insert 1 PR above, cherry pick commits from PR1 to new PR2, rebase
If more than 1 split is required, it's even more error prone manipulations

Proposal

gh stack split [<new-branch>] [--at <commit>]

  • Current branch keeps commits up to <commit>
  • <commit> and commits above move to <new-branch>, inserted directly above the current branch in the stack (if some PR are already stacked above current PR)
  • Branches already above are rebased onto the new layer; existing PRs keep their identity, the current PR's base is unchanged

Ideally, interactive mode lists the current branch's commits, user picks the split point and types the new branch name: this could happen in the gh stack modify view

主要言語
Go
スター
1.5k
フォーク
73
平均マージ
1日 8時間
マージ済み PR(30日)
7

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/gh-stack のほかの issue

github/gh-stack の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。