git常见问题及解决方法
简介
由于在git使用过程中会出现各种各样的问题,因此本文将常见的问题记录下来并提供相应的解决方案,方便后续查找。
git clone出现 SSL certificate problem: unable to get local issuer certificate
这个问题是由于没有配置信任的服务器HTTPS验证,只需要关闭ssl认证即可
git config --global http.sslVerify false
git pull问题: There is no tracking information for the current branch.
$git pull
There is no tracking information for the current branch.
Please specify which branch you want to merge with.
See git-pull(1) for details.
git pull <remote> <branch>
If you wish to set tracking information for this branch you can do so with:
git branch --set-upstream-to=origin/<branch> source
由于当前的分支没有跟踪到git上的对应分支。
解决方法
1.直接拉取对应分支代码:
git pull origin <branch>
2.将本地分支跟踪到git上的对应分支:
git branch --set-upstream-to=origin/<branch> source
git pull问题:Your configuration specifies to merge with the ref 'refs/heads/v.autoCheckProduct.20190325' from the remote, but no such ref was fetched.
可能是由于远程分支名称发生了变动,可以先切换为其他分支,再切回来即可
git checkout master
git pull
git checkout develop
git clone/push总是需要输入用户名和密码
可以先输入以下命令永久保存密码,在下次输入用户名密码后将记录密码
git config --global credential.helper store
分类:
git相关
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· C#/.NET/.NET Core优秀项目和框架2025年2月简报
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 【杭电多校比赛记录】2025“钉耙编程”中国大学生算法设计春季联赛(1)