I want to ignore everything, except a specific subfolder (and all of its contents!). I tried solutions from possible duplicate questions without any success.
I\'d ne
I want to ignore everything
add the folder to the gitignore
except a specific subfolder (and all of its contents!).
force folder to be added to the repository
git add -f folder
EDIT:
I use this solution for example when I need to keep log folder, for example, but not its content. Generally, when I suppose the content of the folder is never to be added. And generally I add just path/to/folder/.gitkeep file with -f option.