git push 報錯

錯誤如下
在這裏插入圖片描述

$ git push
To https://gitee.com/Songothao/Web_demo_2020.git
 ! [rejected]        master -> master (fetch first)
error: failed to push some refs to 'https://gitee.com/Songothao/Web_demo_2020.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

解決辦法如下

$ git push -f
Enumerating objects: 113, done.
Counting objects: 100% (113/113), done.
Delta compression using up to 4 threads
Compressing objects: 100% (107/107), done.
Writing objects:  38% (44/113), 10.45 MiB | 192.00 KiB/s

在這裏插入圖片描述



知乎:叄貳壹

簡書:帶只拖鞋去流浪

關注我,帶你一起寫bug

warning :未經授權,不得轉載

有問題的小夥伴請在下方留言,喜歡就點個贊吧

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