Logo Questions Linux Laravel Mysql Ubuntu Git Menu

.gitignore not ignoring subdirectory, tried it all [duplicate]



I have tried putting all kinds of crazyness into the gitignore file, I would like to ignore all files in the public/dist folder

public/dist/ public/ */public/dist/ **/public/dist

and all other kinda of variations.

this is what I see when I run git status, I want to ignore the bundle.js enter image description here

like image 928
Sean Malter Avatar asked Dec 08 '22 18:12

Sean Malter

1 Answers

After you've added the new .gitignore to your working index, don't forget to remove any files that you don't want to track via git rm --cached. In your case, you'd want to use git rm --cached public/dist/bundle.js to stop tracking that file.

like image 125
Makoto Avatar answered Dec 11 '22 09:12