I see similar questions, but I'm not finding anything that will do what I'm trying to do for some reason.
I have a CodeIgniter PHP library that I maintain, so my project is a full CI install that includes my library. I'm trying to ignore everything except the files that make up my library.
I feel like I've read about the syntax to do this, but I'm getting unexpected results with directories.
First, I start with this:
*
!.gitignore
!README.rst
!instructions.html
You can see here that everything is grayed out (ignored) except for those 3 files under the site root, which means those files are no longer ignored...exactly what I want so far.
When I move on to try and un-ignore the rest of the library files, though, which live in directories, it simply doesn't work. For example, if I add...
!application/controllers/paypal
You can see that the directory and files in it are still grayed out (ignored), and of course when I run git commands they are indeed ignored.
Any information on what I need to do to get this working would be greatly appreciated.