{
  "id": "git/push-non-fast-forward",
  "signature": "error: failed to push some refs to 'origin' hint: Updates were rejected because the remote contains work that you do not have locally.",
  "signature_zh": "错误：无法将一些引用推送到 'origin' 提示：更新被拒绝，因为远程包含您本地没有的工作。",
  "regex": "failed to push some refs.*remote contains work that you do not have locally",
  "domain": "git",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "Local branch is behind the remote branch; push is rejected to prevent overwriting remote changes.",
  "root_cause_type": "generic",
  "root_cause_zh": "本地分支落后于远程分支；拒绝推送以防止覆盖远程更改。",
  "versions": [
    {
      "version": "git 2.31.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.44.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Using 'git push --force' may overwrite remote commits and cause data loss for collaborators.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Running 'git pull' without merging may result in merge conflicts if not handled properly.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Pull the remote changes first: 'git pull origin main --rebase' to rebase local commits on top, then push again.",
      "success_rate": 0.9,
      "how": "Pull the remote changes first: 'git pull origin main --rebase' to rebase local commits on top, then push again.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If conflicts occur, resolve them manually, then continue the rebase with 'git rebase --continue' and push.",
      "success_rate": 0.85,
      "how": "If conflicts occur, resolve them manually, then continue the rebase with 'git rebase --continue' and push.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Pull the remote changes first: 'git pull origin main --rebase' to rebase local commits on top, then push again.",
    "If conflicts occur, resolve them manually, then continue the rebase with 'git rebase --continue' and push."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-push",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2023-04-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}