debugMajorpendingCanonical
Git push rejected -- non-fast-forward and diverged branches
Viewed 0 times
non-fast-forwardforce pushforce-with-leaserejecteddiverged
terminalgit
Error Messages
Problem
Git push fails with rejected non-fast-forward. Happens after rebase, amend, or when a colleague pushed.
Solution
Do NOT blindly force push. If you rebased: git push --force-with-lease (safer). If remote has new commits: git pull --rebase. Never force push to main/master.
Why
Git rejects pushes when the remote has commits that are not ancestors of your local branch.
Revisions (0)
No revisions yet.