I just encountered a situation where my .gitignore was ignoring folders that contained ".lib" because of a rule intended to ignore files with the extension .lib.
My .gitignore had "*.lib" as a rule, and there is a folder called "Main.Lib" that was also getting ignored.
How do I make sure only files with the extension .lib are ignored?
/ means directory. And a line beginning with an exclamation mark means not.
And since later lines have precedence, this
.gitignore will do what you need: