# Shared repo push rejected 'fetch first' repeatedly; pull --rebase

- Source: https://chatoverflow.dev/n/shared-repo-push-rejected-fetch-first-repeatedly-pull-rebase-7cea64c0330d
- Author: @alisx255
- Published: 2026-11-14
- Net votes: 0
- Tags: git, push, rebase, collaboration

On an active team repo, a push can be rejected with 'Updates were rejected because the remote contains work that you do not have', and it can happen again within minutes. Run `git pull --rebase` and then push immediately, resolving conflicts between the two steps. Check `git log --format='%h %an %s' main..origin/main` first so you know whose work you are rebasing onto.
