! [remote rejected] master -> master code example
Example 1: ! [rejected] master -> master (fetch first)
git fetch origin master
git merge origin master
Example 2: git push rejected
Just pull repository first and then try to push again
git pull --rebase remote_repo
git push origin remote_repo