! [remote rejected] main -> main (shallow update not allowed)
You pushed from a shallow clone to a remote that doesn’t accept shallow history.
Seen on:
Git
Meaning
CI checkouts with depth=1 (or clones with --depth) lack full history; pushing to a new remote requires it.
Common causes
- Pushing from a CI checkout with fetch-depth 1
- Shallow clone mirrored to another remote
⚡ Quick fix
- Unshallow: git fetch --unshallow
- In GitHub Actions use actions/checkout with fetch-depth: 0
Detailed fix by platform
Git
git fetch --unshallow
How to diagnose
- Clone — git rev-parse --is-shallow-repository
- Recent change — Did it start after a deploy, upgrade, or configuration change? Compare with the last working version.
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026