Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/github/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Git 如何修复引用标头错误?_Git_Github_Version Control_Repo - Fatal编程技术网

Git 如何修复引用标头错误?

Git 如何修复引用标头错误?,git,github,version-control,repo,Git,Github,Version Control,Repo,git fetch github+refs/heads/n:refs/remotes/github/n 致命:找不到远程引用/heads/n :git fetch github+refs/heads/n-caf:refs/remotes/github/n-caf 致命:不是git存储库:'/home/movingshadowninja/DU/.repo/projects/kernel/oneplus/msm8994.git' :export GIT_DIR=/home/movingshadown

git fetch github+refs/heads/n:refs/remotes/github/n 致命:找不到远程引用/heads/n :git fetch github+refs/heads/n-caf:refs/remotes/github/n-caf 致命:不是git存储库:'/home/movingshadowninja/DU/.repo/projects/kernel/oneplus/msm8994.git'

:export GIT_DIR=/home/movingshadownija/DU/.repo/projects/device/oppo/common.GIT


我总是会犯这样的错误,我该如何着手修复它呢

请确认以下事项:

  • 检查远程回购短名称是否为github by
    git remote-v
  • 检查.git文件夹中的config文件,确保
    fetch=+refs/heads/*:refs/remotes/github/*

  • 如果仍然存在错误,您可以将远程回购克隆到其他文件夹中,这是最简单的方法。

    如果您进一步澄清您的问题,我们将更容易提供帮助。你能加上一些背景吗?。。。也许还需要对格式进行一些修改。眼睛有点痛。。。