Git 忽略 public/index.html
Git ignore public/index.html
感谢阅读我在 advance.The 中的问题 Git 总是忽略 public/index.html 文件。
我通过 create-react-app 创建了一个项目,它运行成功。
但是当我将它推送到 Github 时,public/index.html 丢失了。
Take this project for example.
.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 和 commit/push 它 again.But 它没有显示要提交的内容。我该如何解决这个问题?终端看起来像这样:
文件不是 added/committed 时使用的命令是:
git check-ignore -v -- public/index.html
这将告诉您是否有 any gitignore/exclude/core.excludesfile
文件带有忽略规则。
通常,IDE 可以在全局 gitignore 文件中添加自己的忽略规则。
感谢阅读我在 advance.The 中的问题 Git 总是忽略 public/index.html 文件。
我通过 create-react-app 创建了一个项目,它运行成功。
但是当我将它推送到 Github 时,public/index.html 丢失了。
Take this project for example.
.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 和 commit/push 它 again.But 它没有显示要提交的内容。我该如何解决这个问题?终端看起来像这样:
文件不是 added/committed 时使用的命令是:
git check-ignore -v -- public/index.html
这将告诉您是否有 any gitignore/exclude/core.excludesfile
文件带有忽略规则。
通常,IDE 可以在全局 gitignore 文件中添加自己的忽略规则。