{
  "id": "git/conflict-modify-delete",
  "signature": "CONFLICT (modify/delete): file.txt deleted in HEAD and modified in branch. Version branch of file.txt left in tree.",
  "signature_zh": "冲突（修改/删除）：file.txt 在 HEAD 中被删除，但在分支中被修改。分支版本的 file.txt 保留在树中。",
  "regex": "CONFLICT \\(modify/delete\\): .+",
  "domain": "git",
  "category": "conflict_error",
  "subcategory": null,
  "root_cause": "One side of a merge deleted a file while the other side modified it, causing a modify/delete conflict.",
  "root_cause_type": "generic",
  "root_cause_zh": "合并的一方删除了一个文件，而另一方修改了该文件，导致修改/删除冲突。",
  "versions": [
    {
      "version": "git 2.30.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.39.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.45.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Running git add on the conflicted file without resolving the conflict will keep the conflict marker in the staged file, leading to build errors or incorrect content.",
      "fail_rate": 0.65,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Using git merge --abort when you actually want to keep changes discards all merge progress and requires starting over.",
      "fail_rate": 0.3,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "git checkout --ours file.txt && git add file.txt  # Keep the deleted side (HEAD), effectively deleting the file",
      "success_rate": 0.8,
      "how": "git checkout --ours file.txt && git add file.txt  # Keep the deleted side (HEAD), effectively deleting the file",
      "condition": "",
      "sources": []
    },
    {
      "action": "git checkout --theirs file.txt && git add file.txt  # Keep the modified side (branch), restoring the file with modifications",
      "success_rate": 0.85,
      "how": "git checkout --theirs file.txt && git add file.txt  # Keep the modified side (branch), restoring the file with modifications",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "git checkout --ours file.txt && git add file.txt  # Keep the deleted side (HEAD), effectively deleting the file",
    "git checkout --theirs file.txt && git add file.txt  # Keep the modified side (branch), restoring the file with modifications"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-merge#_how_to_resolve_conflicts",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}