CheatSheet
Ignore the contents of dir foo/
.gitignore
foo/*
Ignore dir foo/
anywhere in the project this is a bit overkill
.gitignore
**/foo/**
Example using .env
.gitignore
**.env**
This ignores
.env.env.foo.env.*foo/.envfoo/.env.*foo/bar/.env.*
Gotchas
Vscode
Heavy handed handle, this ignores .vscode
anyware in a project and any sub configs
**/.vscode/**
.gitignore
.vscode/*.vscode/settings.json.vscode/tasks.json.vscode/launch.json.vscode/extensions.json.vscode/*.code-snippets