Vscode to github: too many changes (10k) being committed

i can not find the repository button on my source tab on vscode. this is because there is too many changes trying to be commited . (10K from the source tab) these changes are irrelevant and dont need to be pushed to github. most are files i have in my computer. i tried erasing one and it was completely erased from my files in the computer. i have watched countless videos on yt and none seems to help.
i will appreciate any help i can get.

Welcome to the forum!

Are you building a JavaScript/ JS framework app ? It sounds like you are trying to push Node/Express server files to GitHub.

You can prevent certain data from being commited in your .gitignore file.

Here’s a tutorial including a list of files that should be ignored:

  1. You need to git init from inside the project root folder. It should only track the relevant project files.

  2. You need to .gitignore dependencies like the node_modules folder.


I would suggest you start over.

If you did the init outside the project folder find and delete the .git folder that was created by accident (you need to be able to see hidden files and folders).

Then run git init from a terminal that is opened inside your project folder. If you open the project folder inside VS Code the integrated terminal will open in the correct location.

Then create a .gitignore file inside the root project folder and add node_modules to it.

This worked . for anyone else that may encounter the same issue in the future, if you cant find the .git file in file explorer try doing it from the command/power shell with admin rights.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.