Skip to content

Instantly share code, notes, and snippets.

@NostraDavid
Last active Dec 23, 2021
Embed
What would you like to do?
Whitelisting gitignore, instead of the default blacklisting.
# ignore all root items, not recursively
/*
# whitelist dirs
!docs
!example_data
!requirements
!src
!tests
# whitelist files
!.env.dist
!.gitattributes
!.gitconfig
!.gitignore
!.pre-commit-config.yaml
!MANIFEST.in
!pyproject.toml
!README.md
!Requirements.md
!setup.py
!tox.ini
# recursively blacklist these (in case they pop up in a whitelisted folder)
__pycache__
*.egg-info
*.pyc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment