.gitignore tips ignore files under a folder /t/* But you want to exclude certain folders in the ignoring folder /t/* !/t/exceptions/*