Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/23.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 错误:无法索引文件';src/hoc/Aux.js';_Git_Github - Fatal编程技术网

Git 错误:无法索引文件';src/hoc/Aux.js';

Git 错误:无法索引文件';src/hoc/Aux.js';,git,github,Git,Github,我在GitHub中创建了一个新的存储库,并尝试将我的react项目添加到该存储库中。在那里,当我试图添加git时,出现了下面的错误 error: open("src/hoc/Aux.js"): No such file or directory error: unable to index file 'src/hoc/Aux.js' fatal: adding files failed git status给出了以下状态: PS F:\ReactTutorialsTest\

我在GitHub中创建了一个新的存储库,并尝试将我的react项目添加到该存储库中。在那里,当我试图添加git时,出现了下面的错误

error: open("src/hoc/Aux.js"): No such file or directory
error: unable to index file 'src/hoc/Aux.js'
fatal: adding files failed
git status
给出了以下状态:

PS F:\ReactTutorialsTest\burger-builder-project> git status
On branch master

No commits yet

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .gitignore
        README.md
        debug.log
        package-lock.json
        package.json
        public/
        src/

nothing added to commit but untracked files present (use "git add" to track)
PS F:\reacttutorialtest\burger builder项目>git状态
论分行行长
还没有承诺
未跟踪的文件:
(使用“git add…”包含在将提交的内容中)
.gitignore
自述文件
调试日志
package-lock.json
package.json
公开的/
src/
提交时未添加任何内容,但存在未跟踪的文件(使用“git add”跟踪)

那么,我该如何更正此错误呢?

我将文件名更改为除Aux之外的另一个名称。所以,它确实起了作用。使用不同的文件名可以更正错误