Cannot push to GitHub - keeps saying need merge

后端 未结 30 2302
天命终不由人
天命终不由人 2020-11-22 00:09

I\'m new to GitHub. Today I met some issue when I was trying to push my code to GitHub.

Pushing to git@github.com:519ebayproject/519ebayproject.git
To git@gi         


        
30条回答
  •  逝去的感伤
    2020-11-22 01:04

    Your branch should include the latest merged changes as soon as you notice them, but you haven't pulled the latest changes.

    git fetch 
    

    might be all that is needed. If that doesn't work, then you might need to:

    git pull   --rebase
    

    If you don't have any merge conflicts, you should be able to push your changes successfully.

    git push  
    

    If you encounter merge conflicts, you cannot solve them remotely in GitHub. You have to solve them locally and then push the resolutions with a force label because a merge conflict resolution changes history.

    git push   -f
    

提交回复
热议问题