Error pulling remote code by git pull!

yesterday I push the code in the company computer to the github warehouse, and then the code in my own computer has also been changed, but I don"t have push, today. I want to update the code of yesterday"s push in the company to my local error report.

clipboard.png

execute git pull origin master:master why the native code is still the same.

do you have to execute git push before you want to git pull?

Mar.22,2021

first of all, this is not a mistake.

this is just a reminder that the code in your current workspace conflicts with the remote code and requires to resolve the conflict .

there are two ways to solve this problem.

  1. commit, the code and then pull (merge). This time will let you resolve the conflict. After you resolve it, resubmit a commit
  2. .
  3. put the code in the storage area, and then pull. When you are done, take the code out of the storage area and resolve the conflict.

I hope my answer will be helpful to you.


you can temporarily save your own code
git stash
git pull origin master
git stash pop

Menu