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 :未经授权,不得转载

有问题的小伙伴请在下方留言,喜欢就点个赞吧

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