.gitignore syntax - how to exclude virtualenv sub-directories?
- Create in your current project's folder ".gitignore" file
- For example, if you have some folders as "venv" and ".vscode" than you just add their names in ".gitignore" file: venv/ .vscode/
per https://github.com/github/gitignore/blob/master/Python.gitignore
venv/
does the trick for sub-directories.