1. I pulled -f code from the remote gitlab, but the remote update could not be pulled. Later, I saw that there were more than 200 more local commits than the remote one. Is this the reason why I cannot pull the code from the remote warehouse? ? Do I have to push first before I can pull the code remotely?
阿神2017-05-02 09:31:59
If you can’t pull down, it means you have no committed code locally, so you should either commit and push it up first, or git stash first and save it in the stack, then take it out at the appropriate time, and then git pull
某草草2017-05-02 09:31:59
The local has more commit records than the remote, which means the local is newer than the remote, so it is not allowedpull
If there is no conflict between the remote code and your local code, directly modify the local code commit
后 push
to the remote one, and then it will be consistent.
If there is a conflict when pushing, you can
git fetch
git rebase origin/master
Follow the prompts to resolve conflicts.
Then push
local code to remote