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 init删除的目录。“接收”;致命:不是git存储库(或任何父目录)";_Git_Github - Fatal编程技术网

正在尝试提交已被git init删除的目录。“接收”;致命:不是git存储库(或任何父目录)";

正在尝试提交已被git init删除的目录。“接收”;致命:不是git存储库(或任何父目录)";,git,github,Git,Github,我可以提交目录中的单个文件,但它不允许我提交整个目录。您需要在该文件夹中,git commit才能工作。 您需要先添加它 这是行不通的: git init test git add test git commit -m "add test" 这将有助于: git init test cd test git add . git commit -m "add test" 您可以检查文件夹是否为: 确保没有定义像GIT\u DIR这样的环境变量(这将使GIT命令在别处查找GIT repo)您需要在

我可以提交目录中的单个文件,但它不允许我提交整个目录。

您需要在该文件夹中,git commit才能工作。
您需要先添加它

这是行不通的:

git init test
git add test
git commit -m "add test"
这将有助于:

git init test
cd test
git add .
git commit -m "add test"
您可以检查文件夹是否为:

确保没有定义像
GIT\u DIR
这样的环境变量(这将使GIT命令在别处查找GIT repo)

您需要在该文件夹中才能使
GIT commit
工作。
您需要先添加它

这是行不通的:

git init test
git add test
git commit -m "add test"
这将有助于:

git init test
cd test
git add .
git commit -m "add test"
您可以检查文件夹是否为:


确保没有定义像
GIT\u DIR
这样的环境变量(这将使GIT命令在别处查找GIT repo)

如果添加一些复制错误的最小代码,问题将更容易诊断。如果添加一些复制错误的最小代码,问题将更容易诊断。