我克隆了一个远程分支.我如何结帐主人?

问题描述:

我克隆了一个远程分支 git clone-单分支--branch< branchname>< remote-repo>.现在我要结帐主人.当我尝试 git checkout master 时,出现以下错误消息: error:pathspec'master'与git 已知的任何文件都不匹配.如何检出master而不需要单独克隆它?

I cloned a remote branch with git clone --single-branch --branch <branchname> <remote-repo> . Now I want to checkout master. When I try git checkout master I get this error message: error: pathspec 'master' did not match any file(s) known to git. How do I checkout master without having to clone it separately?