In my git repo, I've a directory which may contain nested subdirectories. I'd like to allow only *.py, *.sh and *.json in these nested subdirectories.
I tried adding the following to .gitignore:
/trials/*
!/trials/README
/experimental/**/
!/trials/**/*.py
!/trials/**/*.sh
But it doesn't allow to me to add something like trials/foo/bar.py.