I was going through the answers of How do I add files without dots in them (all extension-less files) to the gitignore file?
One answer is:
* !/**/ !*.