search

Home  >  Q&A  >  body text

A problem using GitHub

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. . .

黄舟黄舟2790 days ago672

reply all(5)I'll reply

  • 迷茫

    迷茫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

    reply
    0
  • PHP中文网

    PHP中文网2017-05-02 09:54:16

    Use git rm

    reply
    0
  • 漂亮男人

    漂亮男人2017-05-02 09:54:16

    You need to delete node_modules in the local git repository

    reply
    0
  • PHPz

    PHPz2017-05-02 09:54:16

    Not git add,是git rm

    reply
    0
  • 怪我咯

    怪我咯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.

    reply
    0
  • Cancelreply