Git - Unignore any folder located anywhere inside repository that recursively allows everything
问题 How to unignore folder with a particular name (e.g. Sync) that can be located anywhere inside the repository and Recursively allow everything inside it, violating every other rule of gitignore? 回答1: The solution proposed ( !/**/Sync/**/* ) would not work alone, because It is not possible to re-include a file if a parent directory of that file is excluded. So if you have a .gitignore with: * !.gitignore You must whitelist folders first ( !*/ ) and then exclude files ( !**/Sync/** , no need for