Git Revert
Git リバート
Git revert は、古いコミットの変更を元に戻す新しいコミットを作成します。古い履歴は削除せずに保持します。
もう一つの例
デプロイされたコミットはチェックアウトを壊します。レビューされたリバートコミットは、壊れたコミットが監査履歴に残ったまま、古い動作を復元します。マージをリバートする場合も、正しいメインライン親を選択する必要があります。
主な部分
- 01ターゲットコミット
- 02逆変更
- 03新しいリバートコミット
以下の場合に使用します
共有履歴を保持したまま公開済みの変更を元に戻す場合にこの用語を使用してください。
以下の場合は使用しないでください
リバートによって競合が発生せず、関連するすべてのシステム状態が復元されるとは想定しないでください。
コードで使用する名前
git revert <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 リバート (Git Revert)。 User context:デプロイされたコミットはチェックアウトを壊します。レビューされたリバートコミットは、壊れたコミットが監査履歴に残ったまま、古い動作を復元します。マージをリバートする場合も、正しいメインライン親を選択する必要があります。 Delivery concept or operation:Git リバート (Git Revert)。 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 Revert) is used now. Definition: Git revert は、古いコミットの変更を元に戻す新しいコミットを作成します。古い履歴は削除せずに保持します。 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.