git add . command not working

git add . is not working it got stuck as you can see the below image. I am building an expo project and the directory structure is in the image. Please help me with this problem.

I also tried git add --all, git add -A none is working

enter image description here

3

1 Answer

This is because the node_modules folder is not ignored and hence when we run git add . command git visit all your directory/files and sub directory/files which is not ignored in .gitignore hence it is taking so long time to process it as node_modules contains a large amount of files and folder.

Solution:

Create .gitignore file in root directory of project and add node_modules folder to file .gitignore

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like