Git Cherry-pick
Git Cherry-pick
Git cherry-pick は、一つまたは複数の選択したコミットの変更を現在のブランチにコピーします。新しいIDで新しいコミットをそこに記録します。
もう一つの例
レビュー済みのセキュリティ修正はmainにあり、サポート対象のリリースブランチにも必要です。Cherry-pickはそこに同等の新しいコミットを作成し、そのソースを記録します。全く関係のない機能全体をコピーすると、履歴が重複し、必要な依存関係が欠落することがあります。
主な部分
- 01ソースコミット
- 02適用済みパッチ
- 03新しい宛先コミット
以下の場合に使用します
バックポートのように、既知の小さな変更を慎重に別のブランチに移す場合、この用語を使用します。
以下の場合は使用しないでください
長期間存在するブランチを同期させるために、または変更に依存するコミットを隠すためにcherry-pickを使用しないでください。
コードで使用する名前
git cherry-pick <commit> 出荷前に
Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback.
Outcome:Complete the task with Git Cherry-pick (Git Cherry-pick)。 User context:レビュー済みのセキュリティ修正はmainにあり、サポート対象のリリースブランチにも必要です。Cherry-pickはそこに同等の新しいコミットを作成し、そのソースを記録します。全く関係のない機能全体をコピーすると、履歴が重複し、必要な依存関係が欠落することがあります。 Delivery concept or operation:Git Cherry-pick (Git Cherry-pick)。 Why it fits:バックポートのように、既知の小さな変更を慎重に別のブランチに移す場合、この用語を使用します。 Do not use it when:長期間存在するブランチを同期させるために、または変更に依存するコミットを隠すためにcherry-pickを使用しないでください。 Delivery requirements: Name the code repository and target. List preconditions, changes, review and CI checks, conflict and data-loss risks, release order, and the rollback or recovery command. Repository safeguards: Keep unpublished work and a clear history. Do not run destructive steps without an explicit backup. Check the exact code diff and remote target before publishing. Acceptance criteria: Review the intended diff and pass all required checks. Keep the target version traceable. Practice failure recovery and keep published history clear. Evidence and limits (evidence boundary):その情報源にとって公式です。他のプラットフォームやチームはその用語を別の方法で使用する場合があります。 Unknowns to confirm: Repository, branch, team activity, release environment, approval owner, protected checks, and rollback target.
このリクエストを確認する
Review how Git Cherry-pick (Git Cherry-pick) is used now. Definition: Git cherry-pick は、一つまたは複数の選択したコミットの変更を現在のブランチにコピーします。新しいIDで新しいコミットをそこに記録します。 Release checks: Before publishing, check the exact repository, branch, target, and diff. Keep unpublished work. Pass review and CI checks. Record conflict and data-loss risks, release order, traceability, recovery, and rollback. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.