Cannot push to GitHub - keeps saying need merge

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

    In addition to the answers above, the following worked for me : -

    Scenario -

    1. I pushed my_branch to origin successfully.
    2. I made few more changes.
    3. When I tried to push again, (after doing add, commit of course), I got the above mentioned error.

    Solution -

     1. git checkout **my_branch**
     2. git add, commit your changes.
     3. git pull origin **my_branch** (not origin, master, or develop)
     4. git push origin **my_branch**
    

提交回复
热议问题