ignore a particular folder only in .gitignore but allow other folders with same name to be checked in

Viewed 2908

I want to ignore a dist folder at top level of my project, but then I have another dist folder inside my project for my styles, which I want to keep. So keeping a dist in .gitignore causes both of them to be ignored. What is the correct way to handle this.

3 Answers

Inside your project

$ git rm --cached /c/projects/yourApp/dist -r
Related