Your push to the remote repository will be rejected if your local repository is outdated.
When this is the case, you can use the git merge command to integrate the latest changes from your local copy of the remote branch before you push. Git enforces this to ensure that changes made by other members get retained in the version history.
During a merge, Git will attempt to automatically apply historical changes and merge them with the current branch. However, if there is a conflict, an error will prompt you to resolve it manually.