Question:

git add,commit 之后 git push -u origin master 报错
【Git】Bug —— Updates were rejected because the remote contains work that you do

Answer:

  1. git pull origin master --allow-unrelated-histories
    【Git】Bug —— Updates were rejected because the remote contains work that you do
    两次Esc键 退出编辑模式,:wq 保存并退出

  2. git pull origin master
    【Git】Bug —— Updates were rejected because the remote contains work that you do

  3. git push -u origin master
    【Git】Bug —— Updates were rejected because the remote contains work that you do

相关文章: