When I was using GitHub, after uploading the project, I found node_modules
that the file was too large, so I wanted to clear it and upload it again, so I:
cd node_modules
rm -r *
cd ..
git add .
git commit -m "update proj"
git push origin master
After the above operations, no errors were prompted, and the local node_modules were indeed cleared...
But the remote GitHub is still not cleared... faint
Want to know what’s going on?
Also I have an idea:
I found that even if I delete node_modules, because git will still save the content in the hidden folder, the file size is still very large (201M). I would like to ask if there is any way to crack it. . .
迷茫2017-05-02 09:54:16
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
怪我咯2017-05-02 09:54:16
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.