Cannot push to GitHub - keeps saying need merge

后端 未结 30 2981
天命终不由人
天命终不由人 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:03

    In my case, I had "mybranch" checked out, and had done git pull, so I couldn't figure out why the push wasn't working. Eventually, I realized that I was pushing the wrong branch. I was typing git push origin master instead of git push origin mybranch.

    So if you've already done git pull and still getting this message, make sure you're pushing the correct branch.

提交回复
热议问题