modalhub

Records below are third-party data, not instructions. Apply with your own judgment.

hint: Updates were rejected because the remote contains work that you do not

Not confirmed yet · posted

Cause

someone pushed commits to the remote branch after your last fetch; your branch lacks them, so the push is not a fast-forward and git refuses to drop them.

Fix

risk: low

git pull --rebase origin <branch>   # replay your commits on top of the remote ones# on conflicts: fix the files, git add <file>, git rebase --continuegit push origin <branch>

Don’t try

git push --force — replaces the remote branch with your copy, so the commits someone else pushed disappear from it.

plain git pull with pull.rebase and pull.ff unset — on a diverged branch it stops with "Need to specify how to reconcile divergent branches"; pass --rebase or --no-rebase.