Git Rebase
Git リベース
Git rebase は、一連のコミットを別の開始コミットの上に移動させます。Git は変更内容を再生し、再生された各コミットに新しいIDを付与します。
もう一つの例
開発者は、プライベートコミットA~Cを持っている間に、mainブランチは進んでいます。リベースはA′~C′をmainの上に作成し、テストは通過します。共有された公開ブランチをリベースすると、他の人が使うかもしれない履歴が書き換えられます。
主な部分
- 01古いベース
- 02再生されたコミット
- 03新しいコミットID
以下の場合に使用します
チームが履歴の書き換えを理解し、同意した後にローカルコミットを移動または編集する場合にこの用語を使用します。
以下の場合は使用しないでください
他の人がすでに使用しているコミットのベースを変更しないでください。ただし全員が明確に書き換えに同意している場合は例外です。
コードで使用する名前
git rebase [--onto|--interactive] upstream 出荷前に
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 リベース (Git Rebase)。 User context:開発者は、プライベートコミットA~Cを持っている間に、mainブランチは進んでいます。リベースはA′~C′をmainの上に作成し、テストは通過します。共有された公開ブランチをリベースすると、他の人が使うかもしれない履歴が書き換えられます。 Delivery concept or operation:Git リベース (Git Rebase)。 Why it fits:チームが履歴の書き換えを理解し、同意した後にローカルコミットを移動または編集する場合にこの用語を使用します。 Do not use it when:他の人がすでに使用しているコミットのベースを変更しないでください。ただし全員が明確に書き換えに同意している場合は例外です。 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 リベース (Git Rebase) is used now. Definition: Git rebase は、一連のコミットを別の開始コミットの上に移動させます。Git は変更内容を再生し、再生された各コミットに新しい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.