I have a folder in Git with some files in it. Files are a part my Git repository. When running my project some work directories appear in this folder. Directories can have any name and any nesting level with multiple sub-directories. I want to ignore all possible sub-directories appearing in this folder but still keep all files (not directories) sitting in root of my folder.
I've tried patterns:
/
*/
/*
/*/
None of above gives desired result. How it can be accomplished?
Many answers explain how to ignore folders with specific names, for instance Git ignore sub folders. But there seem no explanation on how to ignore all sub-folders with wild cards.