因此,我尝试使用本地 git 构建中的 create-react-app
推送我的初始提交。我的 .gitignore 看起来像这样:
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
# testing
/coverage
# production
# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
我的目录如下所示:
默认目录结构不变,为什么还要上传node_modules
?
更新信息:
所以在我的 gitignore 中修改了它,但它似乎仍然推送了“node_modules”。我的 git 根目录是 theapp > build/node_modules/public/etc...如果有帮助的话。
我继续并允许它,但在使用 git push azure master
推送结束时,我现在得到了这个:
此外,在 Windows 中,我的文件资源管理器如下所示:
还有什么想法吗?
最佳答案
/node_modules
正在查看您的计算机的根目录。
你想要的是node_modules/
。它会查找相对于您当前位置的目录。
关于git - create-react-app git 推送 node_modules,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48468847/