Git Error: Updates were rejected because the remote contains work that you do not have locally.

Git报错:Error: Updates were rejected because the remote contains work that you do not have locally.

下午在使用git的时候,用两台电脑同时pull了repo,一台电脑先push后,另一台电脑就无法push了,因为在线版本的内容比电脑里那份还要新,所以 Git 不让你推上去。

  • 解决方法一:先pull最新版本后push

  • 解决方法二:加上了–force或是-f参数强制覆盖

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章