{
  "id": "git/push-rejected-non-fast-forward",
  "signature": "! [rejected]        main -> main (non-fast-forward)",
  "signature_zh": "！ [拒绝]        main -> main（非快进）",
  "regex": "^! \\[rejected\\]\\s+.+\\s+->\\s+.+\\s+\\(non-fast-forward\\)$",
  "domain": "git",
  "category": "protocol_error",
  "subcategory": null,
  "root_cause": "Local branch is behind the remote branch and cannot be fast-forwarded; Git refuses to overwrite remote commits without force push.",
  "root_cause_type": "generic",
  "root_cause_zh": "本地分支落后于远程分支，无法快进；Git 拒绝在没有强制推送的情况下覆盖远程提交。",
  "versions": [
    {
      "version": "git 2.20",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.30",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "git 2.45",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Force push can overwrite remote commits, potentially losing work from other contributors; it should be used with caution.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The error is about commit history divergence, not connectivity; retrying won't change the history mismatch.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Pull the latest remote changes and merge or rebase: git pull origin main --rebase",
      "success_rate": 0.9,
      "how": "Pull the latest remote changes and merge or rebase: git pull origin main --rebase",
      "condition": "",
      "sources": []
    },
    {
      "action": "If you are sure you want to overwrite remote history, use force push with lease: git push --force-with-lease origin main",
      "success_rate": 0.8,
      "how": "If you are sure you want to overwrite remote history, use force push with lease: git push --force-with-lease origin main",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Pull the latest remote changes and merge or rebase: git pull origin main --rebase",
    "If you are sure you want to overwrite remote history, use force push with lease: git push --force-with-lease origin main"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://git-scm.com/docs/git-push#Documentation/git-push.txt---force",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}