$git push origin master
To git@github.com:dimitar9/first_app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to \'git
You need to do a git pull
first.
Update with explanation: Because you don't have the latest code, git forces you to do the merge on your side before pushing changes. This is to help prevent losing changes other people have made.
If you have any conflicts, you should review them to decide whether the local or remote code is what you want to commit.
This means that there are some changes on GitHub which have not been merged into your current branch. To resolve this, do what the error message is telling you to: git pull
, resolve any conflicts, then try pushing again.