I’m cleaning up my development workflow and I was wondering if it is at all possible for Git to ignore a containing folder, but allow folders within?
Allow me to clarify.
I’m currently working on my website and I’m theming my new WordPress blog – Obviously I have a local installation of WordPress and a remote installation. I want to be able to ignore the main folders and only allow the themes folder. The structure is as follows.
- Blog
- wp-content
- wp-includes
- themes
- modules
- […]
I want to ignore absolutely everything except the themes and modules folder – how would I do this in my .gitignore?
How about this: