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

后端 未结 22 1979
萌比男神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条回答
  •  孤独总比滥情好
    2020-11-30 16:45

    This is because you did some changes in your master so the project ask you to pull first. If you want to push it anyway you can use brute force by typing this:

    git push -f origin master
    

    Remember to first commit your changes:

    git add .
    git commit -m "Your commit message"
    

提交回复
热议问题