I want to upload my React Project to GitHub but I want to exclude the node modules folder, how do I do that ?
            Asked
            
        
        
            Active
            
        
            Viewed 2,549 times
        
    -3
            
            
         
    
    
        neil
        
- 353
- 1
- 8
- 17
- 
                    3Add a `.gitignore` file to the repository and put `node_modules` in it. See https://git-scm.com/docs/gitignore – Nick Oct 17 '21 at 01:39
2 Answers
4
            
            
        Create a .gitignore file at the root of your project and add this line:
/node_modules
You can learn more here: https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
 
    
    
        mpora
        
- 1,411
- 5
- 24
- 65
0
            
            
        Just add a .gitignore file at the root folder/directory of your project and the add node_modules folder to ensure that it is not pushed to your remote repository.
 
    
    
        Dev Enock
        
- 86
- 7
