Git ignore public/index.html

Git ignore public/index.html,git,reactjs,github,create-react-app,Git,Reactjs,Github,Create React App,感谢您提前阅读我的问题。Git总是忽略public/index.html文件。 我通过create react应用程序创建了一个项目,该项目成功运行。 但是当我把它推到Github时,public/index.html就丢失了。 .gitignore是: # See https://help.github.com/ignore-files/ for more about ignoring files. # dependencies /node_modules # testing /cove

感谢您提前阅读我的问题。Git总是忽略public/index.html文件。 我通过create react应用程序创建了一个项目,该项目成功运行。
但是当我把它推到Github时,public/index.html就丢失了。
.gitignore是:

# See https://help.github.com/ignore-files/ for more about ignoring files.

# dependencies
/node_modules

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
我尝试新建另一个index.html并再次提交/推送它,但它没有显示要提交的内容。我如何解决这个问题?终端如下所示:

在未添加/提交文件时使用的命令是:

git check-ignore -v -- public/index.html
这将告诉您是否有任何gitinore/exclude/
core.excludesfile
文件具有忽略规则


通常,IDE可以在全局gitignore文件中添加自己的忽略规则。

您可能有其他gitignore文件。中介绍了要查找的位置