DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’» is a community of 963,673 amazing developers

We're a place where coders share, stay up-to-date and grow their careers.

Create account Log in
Cover image for VS Code Tip of the Week: Exclude Git Ignore
Nick Taylor for VS Code Tips

Posted on • Originally published at community.vscodetips.com

VS Code Tip of the Week: Exclude Git Ignore

This week's tip is the Exclude Git Ignore user setting. This is a great feature to declutter the tree explorer of VS Code with files your project ignores via its .gitignore file.

The setting can be enabled/disabled in your user settings for VS Code. You can open the settings starting the command palette and searching for settings.

VS Code command palette open with the search term settings entered

The user settings window opens. Search for gitignore and press the ENTER key or use the filter button. Ensure the Explorer: Exclude Git Ignore option is checked.

VS Code user settings user interface open and filtered on the word gitignore

You can also change the settings in settings.json. Open the command palette again and search for settings. This time select Settings (JSON).

VS Code command palette open with the search term settings entered and Settings (JSON) is selected

In the settings.json file, add the following key/value pair:

"explorer.excludeGitIgnore": true

And that's it!

Happy VS Coding!

Top comments (3)

Collapse
 
nusteral profile image
Nhung Duong • Edited on

Why don't we exclude .gitignore by itself?

Collapse
 
nickytonline profile image
Nick Taylor Author

It's a file you might need to edit which is why it's not ignored.

Collapse
 
nusteral profile image
Nhung Duong • Edited on

Thank you for the useful explanation, Nick!

πŸ‘‹ Hey, my name is Noah and I’m the one who set up this ad. My job is to get you to join DEV, so if you fancy doing me a favor, I’d love for you to create an account.

If you found DEV from searching around, here are a couple of our most popular articles on DEV: