I have two lines in my .gitignore
file:
somedir/local/*
!somedir/local/ssh/.gitkeep
However even the file .gitkeep
in somedir/local/ssh
seems to be ignored. which is evidently not what I wish. (I do wish all other files in somedir/local/ssh
to be ignored).
If I don't use a nested directory but rather:
somedir/local/*
!somedir/local/.gitkeep
And put the file there it is working as expected.
I've also tried (ideal solution) to allow "gitkeep anywhere, never ignore any file named that way"
somedir/local/*
!.gitkeep
However this once again does not consider a file that is situated in a subdirectory that would be ignore (ie somedir/local/gitkeep
) and only in the directly ignored directory.