{
  "id": "git/remote-origin-mismatch",
  "signature": "fatal: No configured push destination. Either specify the URL from the command-line or configure a remote repository using 'git remote add <name> <url>' and then push using the remote name.",
  "signature_zh": "致命错误：未配置推送目标。请从命令行指定URL，或使用'git remote add <name> <url>'配置远程仓库，然后使用远程名称推送。",
  "regex": "fatal: No configured push destination\\. Either specify the URL from the command-line or configure a remote repository",
  "domain": "git",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The repository has no remote configured for push, or the upstream branch is not set, causing 'git push' to fail without an explicit destination.",
  "root_cause_type": "generic",
  "root_cause_zh": "仓库没有配置用于推送的远程，或未设置上游分支，导致'git push'在没有明确目标时失败。",
  "versions": [
    {
      "version": "2.39.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.40.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "2.41.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Running 'git push origin main' without checking if 'origin' remote exists.",
      "why_fails": "If the remote 'origin' doesn't exist, this will fail with 'fatal: 'origin' does not appear to be a git repository'.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually editing .git/config to add a remote without using 'git remote add'.",
      "why_fails": "This can work if done correctly, but is error-prone and may cause syntax issues. Better to use the git command.",
      "fail_rate": 0.4,
      "condition": "",
      "sources": []
    },
    {
      "action": "Using 'git push --all' to push all branches at once.",
      "why_fails": "This still requires a remote destination; without one, it fails with the same error.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Add a remote repository: 'git remote add origin https://github.com/user/repo.git'. Then push: 'git push -u origin main'. The '-u' flag sets the upstream, so future pushes can be just 'git push'.",
      "success_rate": 0.95,
      "how": "Add a remote repository: 'git remote add origin https://github.com/user/repo.git'. Then push: 'git push -u origin main'. The '-u' flag sets the upstream, so future pushes can be just 'git push'.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the remote exists but the upstream is not set, set it: 'git branch --set-upstream-to=origin/main'. Then push with 'git push'.",
      "success_rate": 0.9,
      "how": "If the remote exists but the upstream is not set, set it: 'git branch --set-upstream-to=origin/main'. Then push with 'git push'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "添加远程仓库：'git remote add origin https://github.com/user/repo.git'。然后推送：'git push -u origin main'。'-u'标志设置上游，以后只需'git push'即可。",
    "如果远程已存在但未设置上游，请设置：'git branch --set-upstream-to=origin/main'。然后使用'git push'推送。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-push#Documentation/git-push.txt",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2024-02-18",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}