VAAA VAAA - 11 months ago 81
Git Question

How to exclude project from .gitignore

I have a Visual Studio solution, inside my solution I created a new project named:


I committed but saw there is nothing to commit.

Then I opened my .gitignore file and saw a *.log and [Ll]og/. So Im sure that why
folder is exluded.

What do I have to add in my .gitignore file so my new project is added but everything inside is filtered with the .gitignore patterns?

Answer Source

Try adding !MyProject.log to the .gitignore file. The ! reverses the exclusion. Put it after the pattern that excludes it.