github提交出错error: failed to push some refs to ...

警告
本文最后更新于 2021-07-31,文中内容可能已过时,请谨慎使用。

error: failed to push some refs to ‘github.com:Barneys/Barneys.github.io.git’

/images/img/1627745237041-20210731232716.png
问题截图

依次输入指令

1
2
 git pull --rebase origin master
 git push -u origin master

如下图:

https://cdn.jsdelivr.net/gh/CorPython/images@master//img/20220625153345.png
问题解决