{
  "id": "git/not-a-git-repository-parent-directories",
  "signature": "fatal: not a git repository (or any of the parent directories): .git",
  "signature_zh": "致命错误：不是 git 仓库（或任何父目录）：.git",
  "regex": "fatal: not a git repository \\(or any of the parent directories\\): \\.git",
  "domain": "git",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The current working directory (or any parent) does not contain a .git directory, meaning it is not part of a Git repository.",
  "root_cause_type": "generic",
  "root_cause_zh": "当前工作目录（或任何父目录）不包含 .git 目录，意味着它不属于 Git 仓库。",
  "versions": [
    {
      "version": "git 2.25.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.31.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.40.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Creates a new, empty repository instead of using the existing one; loses connection to the original remote.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Destroys the entire repository; irreversible without backup.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error persists because the environment hasn't changed.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Navigate to the correct repository root: cd /path/to/repo, then retry the command.",
      "success_rate": 0.95,
      "how": "Navigate to the correct repository root: cd /path/to/repo, then retry the command.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the .git folder was accidentally deleted, restore it from backup or re-clone: git clone <remote-url> new-repo && cd new-repo",
      "success_rate": 0.8,
      "how": "If the .git folder was accidentally deleted, restore it from backup or re-clone: git clone <remote-url> new-repo && cd new-repo",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use 'git rev-parse --show-toplevel' to find the root of the current repository, then change directory there.",
      "success_rate": 0.9,
      "how": "Use 'git rev-parse --show-toplevel' to find the root of the current repository, then change directory there.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Navigate to the correct repository root: cd /path/to/repo, then retry the command.",
    "If the .git folder was accidentally deleted, restore it from backup or re-clone: git clone <remote-url> new-repo && cd new-repo",
    "Use 'git rev-parse --show-toplevel' to find the root of the current repository, then change directory there."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-init",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.92,
  "resolvable": "true",
  "first_seen": "2023-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}