【发布时间】:2021-11-23 14:33:57
【问题描述】:
自从政策发生重大变化后——我使用了 SSH 密钥。 在进行更改之前一切顺利。
现在,当我尝试推送更改时,会弹出此错误:(
我推到了 2 个独立的分支。我是项目中唯一的开发者
! [rejected] master -> master (fetch first) error: failed to push some refs to 'github.com:kohenm63/phone_book.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之前运行git pull -
这能回答你的问题吗? ! [rejected] master -> master (fetch first)
-
您提交当前更改,然后从远程服务器拉取更改,解决冲突并推送到远程服务器。