.gitignore exclude folder but include specific subfolder
问题 I have the folder application/ which I add to the .gitignore . Inside the application/ folder is the folder application/language/gr . How can I include this folder? I\'ve tried this application/ !application/language/gr/ with no luck... 回答1: If you exclude application/ , then everything under it will always be excluded (even if some later negative exclusion pattern (“unignore”) might match something under application/ ). To do what you want, you have to “unignore” every parent directory of