如何解决error: failed to push some refs to ‘xxx(远程库)‘
生活随笔
收集整理的這篇文章主要介紹了
如何解决error: failed to push some refs to ‘xxx(远程库)‘
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
當push代碼時,出現如下錯誤:
jinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git push origin faceIdentify To http://192.168.88.98/project/freamwork.git! [rejected] faceIdentify -> faceIdentify (fetch first) error: failed to push some refs to 'http://192.168.88.98/project/freamwork.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 pull命令,然后再按照流程提交一遍即可。
//**先使用git pull 命令** jinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git pull remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), 9.03 KiB | 1.00 MiB/s, done. From http://192.168.88.98/project/freamwork2794f0d..70c25c6 faceIdentify -> origin/faceIdentify Merge made by the 'recursive' strategy.face.sql | 532 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++1 file changed, 532 insertions(+)create mode 100644 face.sql//**重新提交一遍** jinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git status On branch faceIdentify Your branch is ahead of 'origin/faceIdentify' by 2 commits.(use "git push" to publish your local commits)nothing to commit, working tree cleanjinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git add .jinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git commit -m "merge" On branch faceIdentify Your branch is ahead of 'origin/faceIdentify' by 2 commits.(use "git push" to publish your local commits)nothing to commit, working tree clean g jinshu@DESKTOP-L5OTKGN MINGW32 /c/jinshu/develop/projects/freamwork (faceIdentify) $ git push -u origin faceIdentify Enumerating objects: 60, done. Counting objects: 100% (43/43), done. Delta compression using up to 4 threads Compressing objects: 100% (16/16), done. Writing objects: 100% (24/24), 2.83 KiB | 723.00 KiB/s, done. Total 24 (delta 10), reused 0 (delta 0) To http://192.168.88.98/project/freamwork.git70c25c6..1cd4207 faceIdentify -> faceIdentify Branch 'faceIdentify' set up to track remote branch 'faceIdentify' from 'origin'.總結
以上是生活随笔為你收集整理的如何解决error: failed to push some refs to ‘xxx(远程库)‘的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 通过输入流获取的xml格式字符串转为js
- 下一篇: vue中的if判断和for循环语句