(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使用时错误记录的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 如何用大数据进行甜品店选址要素分析
- 下一篇: 安全狗限制计算机名,绕过安全狗用户限制提