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存储库(或装载点/主位置之前的任何父存储库)(未设置跨文件系统的GIt_发现)_Git_Github - Fatal编程技术网

GIt致命:不是在文件系统边界停止的GIt存储库(或装载点/主位置之前的任何父存储库)(未设置跨文件系统的GIt_发现)

GIt致命:不是在文件系统边界停止的GIt存储库(或装载点/主位置之前的任何父存储库)(未设置跨文件系统的GIt_发现),git,github,Git,Github,我在回购协议上做了一个git pull,从那以后,我用git做任何事情都会出错。我通常会遇到以下错误: fatal: Not a git repository (or any parent up to mount point /home) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). 知道是什么原因吗?您正在调用的不是git存储库上的git pull 首先将回购初始化为: git init

我在回购协议上做了一个
git pull
,从那以后,我用git做任何事情都会出错。我通常会遇到以下错误:

fatal: Not a git repository (or any parent up to mount point /home)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

知道是什么原因吗?

您正在调用的不是git存储库上的git pull

首先将回购初始化为:

git init
然后将您的回购来源添加为:

git remote add origin <url of repo>
git远程添加源

然后调用
git pull
或推送您的代码。

如果在非git存储库上调用
git pull
,您将得到错误

解决错误的步骤:

  • git克隆

  • cd
    您克隆的存储库的目录

  • git init

  • 现在您可以
    git pull
    git checkout branchname


  • 是的,但只要我这样做,然后对我想要的分支执行
    git签出
    ,我就会再次得到相同的错误。git获取原始主机2。git重置——硬取头3。git clean-d用于执行
    git克隆
    ,而不是使用空目录执行
    git init