Skip to content

Instantly share code, notes, and snippets.

@pingec
Created November 6, 2019 17:25
Show Gist options
  • Save pingec/222484fa39bffce2935fb1bc4424946b to your computer and use it in GitHub Desktop.
Save pingec/222484fa39bffce2935fb1bc4424946b to your computer and use it in GitHub Desktop.
Whitelist .msi files inside subdir of ignored dir
# Some trickery in order to ignore everything inside bin except bin/release/*.msi paths (rules 2 & 3 are necessary to force git to crawl release subfolder of bin)
# 1. Ignore all files in any bin folder at any subpath
**/[Bb]in/*
# 2. Unignore bin/release subfolder at any subpath so that git will crawl it
!**/[Bb]in/[Rr]elease
# 3. Ignore all files inside bin/release subfolder at any subpath
**/[Bb]in/[Rr]elease/*
# 4. But whitelist .msi files
!**/[Bb]in/[Rr]elease/*.msi
@NutchapolSal
Copy link

amazing 2 lines/hr coding speed

@pingec
Copy link
Author

pingec commented Nov 6, 2019

😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment