【问题标题】:git fatal: 'development' doesn't appear to be a git repository [duplicate]git fatal:“开发”似乎不是 git 存储库 [重复]
【发布时间】:2020-09-14 05:17:41
【问题描述】:

我创建了一个新分支并签出:

git checkout -b new

然后检查远程分支:

git branch -r

等在列表中:

origin/development

我正在尝试将代码从这个分支拉到我的新分支中,但出现错误:

fatal: 'development' 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 pull 开发

我还签入了 .git/config 并设置了远程来源:

[remote "origin"]
    url = https://gitlab.com/myCompany/front.git

为什么我不能从远程分支拉取代码?

【问题讨论】:

标签: git


【解决方案1】:

我正在使用git pull development

这是不正确的。 git pull 接受两个选项,主要是 remotebranchgit pull development 会告诉 git 从development 远程和master 分支中拉取(默认分支是主分支)

告诉 git 从origin/developmment 拉取最新的代码做git pull origin development

【讨论】:

  • 觉得自己好笨 非常感谢(:
猜你喜欢
  • 1970-01-01
  • 2012-04-20
  • 2021-07-28
  • 2017-01-26
  • 2013-08-26
  • 1970-01-01
  • 1970-01-01
  • 2015-07-01
  • 2015-12-30
相关资源
最近更新 更多