Git and GitHub

GitHub rejected your push

What you see
The push fails with “rejected”, “non-fast-forward” or “fetch first”.
Why it happens
GitHub has commits your computer doesn't, for example from another device or a merged pull request.
How to fix it
  1. Ask your agent to pull first, solve any conflict with you, then push again.
  2. Never accept a “force push”: it can erase history.

Message for your agent

GitHub rejected my push. Pull the changes first, explain any conflict in plain words before solving it, then push. Don't force-push.

Tip

How to prevent it: Pull at the start of every session.

Still stuck?Report it to your agent, clearly

Hands-on test on Mac and Windows pending · Last reviewed Nov 8, 2026