Error: "update were reject because the remote work that you do not have locally"

2

I'm trying to store a project for GitHub by git, but when I use the command:

git push oringin master

Displays this message:

  

Updates were reject because the remote work that you do not have locally. This is usually caused by another repository pushing the same ref. You may want to first integrate the remote changes before pushing again.

Translation:

  

Updates have been rejected because of remote work that you do not have locally. This is usually caused by another repository pushing for the same ref. You may want to first integrate the remote changes before you run the push command again.

How can I resolve?

    
asked by anonymous 27.03.2016 / 03:59

1 answer

2

The error is saying that the repository has modifications that you do not have in your local repository. So you have to first give a "pull" to update your local code and then give it a push.

git pull origin master.
git push origin master.
    
27.03.2016 / 05:38