git 拉取新分支 error: pathspec ‘develop‘ did not match any file(s) known to git
git上有develop分支,branch查看分支看不到develop,checkout切换分支报错
一、问题
git上有develop分支,branch查看分支看不到develop,checkout切换分支报错
(一)branch查看分支
git branch -a
结果:看不到develop分支。
(二)checkout切换分支
git checkout develop
结果:报错error: pathspec 'develop' did not match any file(s) known to git.
二、解决方案
先fetch更新分支再checkout切换分支(由于远程分支是新建的,本地没有更新)
(二)fetch更新远程分支
git fetch
(二)checkout切换分支-
git checkout develop
root@ubuntu:/home/ubuntu/linux-tsn# git branch --all * dev remotes/origin/dev root@ubuntu:/home/ubuntu/linux-tsn# git checkout dev2.0 error: pathspec 'dev2.0' did not match any file(s) known to git. root@ubuntu:/home/ubuntu/linux-tsn# git fetch git@192.168.23.45: Permission denied (publickey,gssapi-keyex,gssapi-with-mic). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. root@ubuntu:/home/ubuntu/linux-tsn# ssh-add ~/Ssh.pub ~/Ssh.pub: No such file or directory root@ubuntu:/home/ubuntu/linux-tsn# ssh-add .~/Ssh.pub Error loading key ".~/Ssh.pub": invalid format root@ubuntu:/home/ubuntu/linux-tsn# ssh-add .~/Ssh Identity added: .~/Ssh (.~/Ssh) root@ubuntu:/home/ubuntu/linux-tsn# git fetch remote: Counting objects: 108491, done. remote: Compressing objects: 100% (93832/93832), done. Receiving objects: 95% (103480/108477), 975.51 MiB | 31.39 MiB/s
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 25岁的心里话
· 按钮权限的设计及实现
2021-01-05 Unikernel
2021-01-05 Unikernel初体验