标签:origin git 错误 -- global 仓库 github config
相关命令
-
git remote
git remote add origin xxx (xxx为仓库链接)
给这个链接取一个名字,为origin
-
git pull
git pull <远程主机名> <远程分支名>:<本地分知名>
-
git push
git push origin main
-
删除一个远程仓库
git remote rm xxx(仓库名)
-
修改一个远程仓库链接
git remote set-url origin <remote-url>
-
查询仓库
git remote -v
常见错误
-
把本地的master分支重命名为main
git branch -m master main
-
当Failed to connect to 127.0.0.1 port 1080
// 首先,查一下当前全局的 http 代理: git config --global http.proxy // 如果有代理,就取消 git config --global --unset http.proxy // 再查 https 的代理: git config --global https.proxy // 同样的,有就取消 git config --global --unset https.proxy
-
当'credential-manager' is not a git command
git config --global credential.helper wincred
-
当OpenSSL SSL_read: Connection was reset
git config --global http.sslVerify "false"
-
当fatal: refusing to merge unrelated histories
问题分析:出现这个问题的最主要原因还是在于本地仓库和远程仓库实际上是独立的两个仓库。假如我之前是直接clone的方式在本地建立起远程github仓库的克隆本地仓库就不会有这问题了。
git pull origin main --allow-unrelated-histories
标签:origin,git,错误,--,global,仓库,github,config 来源: https://www.cnblogs.com/flyleixin/p/16427987.html
本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享; 2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关; 3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关; 4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除; 5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。