{
  "id": "git/stash-conflict-on-pop",
  "signature": "error: Your local changes to the following files would be overwritten by merge:\n\tfile.txt\nPlease commit your changes or stash them before you merge.",
  "signature_zh": "错误：您对以下文件的本地更改将被合并覆盖：\n\tfile.txt\n请在合并之前提交您的更改或将其 stash。",
  "regex": "^error: Your local changes to the following files would be overwritten by merge:\\n\\t.+\\nPlease commit your changes or stash them before you merge\\.$",
  "domain": "git",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Running 'git stash pop' when the working directory has uncommitted changes that conflict with the stashed changes.",
  "root_cause_type": "generic",
  "root_cause_zh": "在工作目录有未提交的更改且与 stash 中的更改冲突时运行 'git stash pop'。",
  "versions": [
    {
      "version": "git 2.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.35",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.42",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Git stash does not have a force option; the error persists because the conflict is not resolved.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This loses the local changes permanently without any recovery option.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "First, commit or stash the local changes: git stash push -m 'temp' (or git commit -m 'temp'). Then pop the original stash: git stash pop stash@{1} (adjust index). Finally, restore the temporary stash if needed: git stash pop stash@{0}.",
      "success_rate": 0.85,
      "how": "First, commit or stash the local changes: git stash push -m 'temp' (or git commit -m 'temp'). Then pop the original stash: git stash pop stash@{1} (adjust index). Finally, restore the temporary stash if needed: git stash pop stash@{0}.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}",
      "success_rate": 0.9,
      "how": "Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "First, commit or stash the local changes: git stash push -m 'temp' (or git commit -m 'temp'). Then pop the original stash: git stash pop stash@{1} (adjust index). Finally, restore the temporary stash if needed: git stash pop stash@{0}.",
    "Use 'git stash branch' to create a new branch from the stash, which avoids conflicts: git stash branch new-branch stash@{0}"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-stash#Documentation/git-stash.txt-pop",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-08-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}