Mr.M
Mr.M

Reputation: 1480

how to remove node modules from github (release Branch)

Currently i was working under release branch where I am facing a issue that is when i try to commit my code to the Git.

I was able to see all node Modules is available in my github desktop Please find a reference for the same. Which i don't want to commit this files.

This is my .gitignore file

enter image description here

enter image description here

Folder structure for the refrence

Folder structure

Upvotes: 0

Views: 1050

Answers (2)

zbynour
zbynour

Reputation: 19817

It seems you need to ignore node_modules folder. To do that just add ui/node_modules/**/* line to your .gitignore file.

Upvotes: 1

VonC
VonC

Reputation: 1324937

First, if those files were already committed in the past, you would need to remove them (from Git, not from your disk) in order for them to be ignored:

git rm --cached -r ui/node_modules

Second, even before committing, you can check if your .gitingore works with:

git check-ignore -v -- ui/node_modules/aFile

(replace aFile with an actual file)

If it does return nothing, double-check the content of your .gitignore.
If that file is directly in the ui folder, right above node_modules, then the rule needs to be

node_modules/

Upvotes: 2

Related Questions