{
  "id": "git/rename-branch-conflict",
  "signature": "fatal: A branch named 'feature/new-ui' already exists.",
  "signature_zh": "致命错误：名为'feature/new-ui'的分支已存在",
  "regex": "fatal:\\s+A\\s+branch\\s+named\\s+'[^']+'\\s+already\\s+exists",
  "domain": "git",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "Attempting to create or rename a branch to a name that already exists in the repository.",
  "root_cause_type": "generic",
  "root_cause_zh": "尝试创建或重命名分支到已存在的分支名称",
  "versions": [
    {
      "version": "git 2.42.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.43.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.44.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Using 'git branch -m old new' when 'new' already exists on remote",
      "why_fails": "Local rename does not check remote; push will fail with non-fast-forward",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "Deleting the local branch with 'git branch -D new' then trying to rename",
      "why_fails": "Remote branch still exists; push will still fail",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Delete the existing branch first if safe: git branch -D feature/new-ui && git branch -m old-name feature/new-ui",
      "success_rate": 0.85,
      "how": "Delete the existing branch first if safe: git branch -D feature/new-ui && git branch -m old-name feature/new-ui",
      "condition": "",
      "sources": []
    },
    {
      "action": "Force push the renamed branch after local rename: git push origin --delete feature/new-ui && git push origin feature/new-ui",
      "success_rate": 0.75,
      "how": "Force push the renamed branch after local rename: git push origin --delete feature/new-ui && git push origin feature/new-ui",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Delete the existing branch first if safe: git branch -D feature/new-ui && git branch -m old-name feature/new-ui",
    "Force push the renamed branch after local rename: git push origin --delete feature/new-ui && git push origin feature/new-ui"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-branch",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.83,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-11-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}