git上面有的分支,本地branch却看不到, error: pathspec ‘develop‘ did not match any file(s) known to git.
error: pathspec ‘develop’ did not match any file(s) known to git.一、问题git上有develop分支,branch查看分支看不到develop,checkout切换分支报错(一)branch查看分支#查看所有的分支git branch -a结果:看不到develop分支。(二)checkout切换分支#切换到develop分支git
·
error: pathspec ‘develop’ did not match any file(s) known to git.
一、问题
git上有develop分支,branch查看分支看不到develop,checkout切换分支报错
(一)branch查看分支
#查看所有的分支
git branch -a
结果:看不到develop分支。
(二)checkout切换分支
#切换到develop分支
git checkout develop
结果:报错error: pathspec 'develop' did not match any file(s) known to git.
二、解决方案
先fetch更新分支再checkout切换分支
(二)fetch更新远程分支
#更新分支
git fetch
(二)checkout切换分支
#切换到develop
git checkout develop
如果对你有帮助,可以👍收藏+关注,我们一起学前端~~~
更多推荐
已为社区贡献2条内容
所有评论(0)