问题场景如下:
如我目前在本地的 dev 分支上,想拉取本地 refactor 分支的代码。
于是乎我很顺理成章地想到用 git fetch 命令进行操作。
git fetch refactor
然而系统无情地给了个错误信息:
fatal: 'refactor' does not appear to be a git repository
fatal: Could not read from remote repository.Please make sure you have the correct access rights and the repository
exists.
所以想请教一下这种情况下用 git fetch 命令该如何书写?
个人感觉是不是得加个仓库名称?如果是的话本地仓库名又是啥?(远程的叫 origin)
git checkout refactor # 切换本地分支
git fetch origin # 拉远程机器origin
没有拉取本地分支这一说法.