2를 제외한 모든 서브 디렉토리를 제외하도록 gitignore를 설정하려고합니다. 포함시키고 자하는 2 개의 ~! ~를 포함 시켰습니다. 그러나 Sourcetree는 선택하지 않습니다..gitignore에서 1을 제외하고 모든 서브 디렉토리를 무시하십시오.
여기에 두 개의 파일이 그냥 포함되도록 설정 한 내 관련 gitignore
# .gitignore
node_modules/
wp-content/plugins/
wp-content/upgrade/
!wp-content/plugins/export-tool
!wp-content/plugins/darwin_checkout_tracking
입니다. 그들이 제외되기 전에.
가능한 중복 특정 포함 subfolder] (https://stackoverflow.com/questions/5533050/gitignore-exclude-folder-but-include-specific-subfolder) – phd