VSCODE Extension that helps you to automatically ignore files and folders in your project workspace.
https://marketplace.visualstudio.com/items?itemName=marcdomain.ignoreit
This extension works when you're working in a git repository on VSCODE.
By default, the following files would be ignored with the help of ignoreit. You can add more files to it as you wish.
"ignoreit.array": [".env", "*.pem"]Conditionally enable automatic updates to .env.example file based on truncated .env content
"ignoreit.updateEnvExample": false
ignoreit.mp4
- Install and navigate to vscode
settingsorsettings.jsonpage. - Set
"ignoreit.array": [".env", "*.pem"]to include the files and folders you'd always want to ignore. Feel free to modify it anytime. - If any of the files or folders specified in the array exists in your project directory,
ignoreitextension will add it to the.gitignorefile. - If
.gitignorefile does not exist in your project directory,ignoreitextension will create a.gitignorefile and fill in the files you're to ignore. - The
.gitignorecontent will be the files in your project directory that corresponds to theignoreit.array - You can manually add other files to the
.gitignorefile. New files are always appended to the existing ones. - If
.envfile is part of the files in your directory,ignoreitextension will optionally create a.env.examplefile and fill it with the the truncated contents of your .env file, if"ignoreit.updateEnvExample": true- only variables are filled in, values are left behind. The.envand.env.examplefiles will always be in sync. - You can use wildcards to specify files ending in certain patterns (example:
"*.pem")
ignoreit.array should exist as one of the keys in your VSCODE settings.json file, and the value should be an array of the files you wish to automatically add to .gitignore file in all your project (if the files or folders exist in your project). See example below
"ignoreit.array": [".env", "*.pem", "node_modules", "coverage"]No known issues