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

如下图:

/images//img/1627745951695-20210731233911.png
问题解决