GitHub一个使用的问题
黄舟
黄舟 2017-05-02 09:52:16
0
5
636

我在使用GitHub的时候,将项目上传之后发现node_modules这个文件太大于是想把它清空了再重新上传,于是我:

cd node_modules
rm -r *
cd ..
git add .
git commit -m "update proj"
git push origin master

以上操作后,没有提示错误,本地的node_modules也的确清空了...

但是远程的GitHub上还是没有清空啊..晕

想知道这是怎么回事?

另外我有一个想法:

我发现即使我将node_modules删了,由于git还会在隐藏文件夹内保存内容,所以文件大小还是很大(201M),想问问有什么破解之法嚒。。。

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(5)
迷茫

Generally, node_modules will not be uploaded when uploading front-end projects. Directly npm install through package.json, and git upload. Add all the files you do not want to upload, such as node_modules, to the .gitignore file, and git will automatically ignore it

洪涛

Use git rm

漂亮男人

You need to delete node_modules in the local git repository

PHPzhong

Not git add,是git rm

刘奇

The main thing here is that you use git add. This command can add modified files or new files to the cache area, but for deleted files, you should use git add -A. This is Effective.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!