日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

(Git/Github笔记)Git使用时错误记录

發布時間:2023/12/15 编程问答 23 豆豆
生活随笔 收集整理的這篇文章主要介紹了 (Git/Github笔记)Git使用时错误记录 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

1.OpenSSL SSL_read: Connection was reset, errno 10054

????????錯誤分析:Git服務器的SSL證書沒有經過第三方機構(IDE工具)簽署

? ? ? ? 解決錯誤:鼠標雙擊打開工程項目,右擊鼠標選擇Git Bash Here,執行命令:git config --global http.sslVerify "false"


2.fatal: refusing to merge unrelated histories+git did not exit cleanly (exit code 128)

????????錯誤分析:兩個master分支是兩個不同的版本,具有不同的提交歷史文件,拒絕合并不相關的歷史文件(Github遠程版本庫存在README文件與而Git本機版本庫不存在README文件,沖突)

? ? ? ? 解決錯誤:強制允許不相關歷史master分支合并,鼠標雙擊打開工程項目,右擊鼠標選擇Git Bash Here,執行命令:git pull origin master --allow-unrelated-histories


3.hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.+git did not exit cleanly (exit code 1)

????????錯誤分析:(1)Git本地倉庫的當前版本低于Gihub遠程倉庫的版本(Github遠程版本庫沒有同步到本地Git本機版本庫——理解為:兩個倉庫沒有建立遠程連接關系)。(2)當前Git本機版本庫,沒有添加遠程版本庫URL地址,兩個倉庫獨立分離不關聯。

? ? ? ? 解決錯誤:(1)Git本地版本庫分支強制覆蓋Github已存在的分支,使用命令(不推薦使用):git push -u origin master -f(丟失Github版本庫最新改動,同時上傳本機自己的Git版本庫到遠程倉庫Github)。(2)使用命令:git push -u origin master?/?git push --set-upstream origin master(3)添加URL地址使得本機倉庫關聯遠程倉庫,使用命令:git remote add origin 倉庫地址


4.使用git pull origin master命令
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights?and the repository exists.

????????錯誤分析:(1)沒有創建Git遠程版本庫,導致origin主機名不存在。(2)遠程倉庫和本地倉庫分支沖突,未處理沖突。

? ? ? ? 解決錯誤:(1)使用命令:git remote -v查看當前Git版本庫項目的遠程倉庫URL信息和遠程倉庫名稱(fetch+push)。(2)刪除遠程倉庫URL地址中的origin主機名,執行命令:git remote remove origin(3)重新添加遠程倉庫URL地址,使用命令:git remote add origin 倉庫地址(4)強制合并分支,處理分支沖突,使用命令:git pull origin master --allow-unrelated-histories(5)Git本機版本庫項目提交到Github版本庫倉庫master主分支中,使用命令:git push -u origin master /?git push --set-upstream origin master


5.error: No such remote: 'origin'

? ? ? ? 錯誤分析:沒有添加Git本地版本庫關聯Github遠程版本庫URL地址

? ? ? ? 解決錯誤:(1)使用命令:git remote -v,查詢為空地址,添加遠程版本庫URL地址,使用命令:git remote add origin 倉庫地址


6.?

總結

以上是生活随笔為你收集整理的(Git/Github笔记)Git使用时错误记录的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。