in my .gitignore file I have added '/vendor/'. Unfortunately when I run command git status, console shows me a lot of vendors files and dirs. How I can avoit it?
            Asked
            
        
        
            Active
            
        
            Viewed 1,029 times
        
    1
            
            
        - 
                    2Having `/vendor/` in your .gitignore shouldn't be problem. Run `git rm -rf --cached vendor` first then run `git status` again to see if it goes away. I just suspect that you might have staged or committed it before by accident. – BentCoder Aug 21 '17 at 11:22
- 
                    [How to make Git “forget” about a file that was tracked but is now in .gitignore?](https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore?rq=1) – Veve Aug 21 '17 at 11:33
- 
                    1Possible duplicate of [How to make Git "forget" about a file that was tracked but is now in .gitignore?](https://stackoverflow.com/questions/1274057/how-to-make-git-forget-about-a-file-that-was-tracked-but-is-now-in-gitignore) – phd Aug 21 '17 at 12:12
- 
                    Did you commit your `.gitignore` file yet? If you haven't, `git status` will still show those files. – Jason Roman Aug 21 '17 at 13:50
3 Answers
-1
            
            
        I assume vendor directory is in your git cloned repository, if so you need to rename the entry in .gitignore file as follow.
/vendors or just vendors works fine
 
    
    
        ntshetty
        
- 1,293
- 9
- 20
- 
                    1Well no. /vendor/ will work just fine. git works off of the repository location and knows nothing about the rest of your system. – Cerad Aug 21 '17 at 11:57
- 
                    1
-3
            
            
        Use the relative path instead of absolute i.e. add vendor/ to .gitignore file instead of /vendor/
 
    
    
        hspandher
        
- 15,934
- 2
- 32
- 45
 
     
    