create-react-app git推送node_modules [英] create-react-app git pushing node_modules
问题描述
create-react-app
来推送我的初始提交。我的 .gitignore
看起来像这样: #请参阅https:// help.github.com/ignore-files/了解有关忽略文件的更多信息。
#依赖项
/ node_modules
#测试
/ coverage
#制作
#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
?
更新信息:
修改后,在我的git中忽略,但似乎仍然推动` node_modules'。我的git root是theapp> build / node_modules / public / etc ......如果有帮助的话。
我继续并允许它,但是在我 git push azure master
,我现在得到了这个:
另外,在Windows中,我的文件浏览器如下所示:
进一步的想法?
/ node_modules
正在查看您的计算机的根目录。
你想要的是 node_modules /
。它会查找与您当前位置相关的目录。
So I am trying to push my initial commit using the create-react-app
from a local git build. My .gitignore
looks like such:
# 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*
And my directory looks like this:
Left the directory structure the same by default, so why is it uploaded node_modules
as well?
UPDATED INFO:
So revised that in my git ignore, but it seemed to have still pushed the `node_modules'. My git root is theapp > build / node_modules / public / etc... if that helps.
I went ahead and allowed it, but at the end of my push with git push azure master
, I got this now:
Additionally, within windows, my file explorer looks like this:
Further thoughts?
/node_modules
is looking at the root of your computer.
What you want is node_modules/
. Which looks for that directory relative to your current position.
这篇关于create-react-app git推送node_modules的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!