rejected master -> master (non-fast-forward)

后端 未结 22 1948
萌比男神i
萌比男神i 2020-11-30 16:13

I\'m trying to push my project (all files in a new repository). I follow the steps but when I push with git push -u origin master I get this error:



        
22条回答
  •  萌比男神i
    2020-11-30 17:01

    You need to do

    git branch
    

    if the output is something like:

    * (no branch)
    master
    

    then do

    git checkout master
    

    Make sure you do not have any pending commits as checking out will lose all non-committed changes.

提交回复
热议问题