Cannot push to GitHub - keeps saying need merge

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

    Is your branch name the same as the remote branch name?

    If no, you should checkout a new branch with the same name as the remote branch and try push it again.

    Assume the remote branch you want to push is [testing] and your local branch is named as [test].

    If you`re not in test branch, first switch to it.

    git checkout test
    

    Then open a new branch and name it testing.

    git checkout -b testing
    

    Now, it`s time to push it:

    git push [remote repo] testing
    

提交回复
热议问题