- git push 到仓库时报错
https://*************** ! [rejected] master -> master (fetch first) failed to push some refs to 'https://******************' Updates were rejected because the remote contains work that you do not have locally. This is usually caused by another repository pushing to the same ref. You may want to first integrate the remote changes (e.g., 'git pull ...') before pushing again. See the 'Note about fast-forwards' in 'git push --help' for details.
解决方法:- 强行
push
更新,git push -f origin master
,这样会覆盖掉远程仓库中的最新代码,不建议使用 - 首先使用
git pull
将远程代码拉取到本地,然后查找冲突的部分,修改后重新提交
- 强行
GitHub操作报错
最新推荐文章于 2023-07-25 17:05:10 发布