I was searching for this answer here on SO but nothing was similiar or I got lost. I am trying to exclude all in specific subfolder except one folder. Probably I could do all paths manually, but I think there should be clever way. My file structure:
.gitignore
test/
file1
file2
sim_case/
file1
file2
include/
file1
file2
In .gitignore I have:
**/sim_case
And that is excluding everything from sim_case, but I would like to include folder "include". I tried some variations, and nothing worked.
!**/sim_case/include
!**/sim_case/include/
!**/sim_case/include/*
!sim_case/include/
!sim_case/include/
!sim_case/include/*