Gitignore in VSCode

eclecticcoding profile image Chuck ・1 min read

This week I published an article about automating the creation of a LICENSE file for GIT in VSCODE. I wanted to consider the same methodology for the obligatory .gitignore file.

As you probably already know, the gitignore file is used in your local GIT repository to ignore files, like node_modules directory and env files which may contain API keys, to exclude them from your repository.

Just like with the LICENSE file example, you could easily copy a gitignore file from another repository and include it in your next commit, but there is an EASIER way?

alt text

VSCode Extensions

If you are using Vscode as your IDE, you already know there are a ton of extensions for almost everything you need. Today, I found this nifty extension, called .gitignore Generator which installs a .gitignore file, specific for your type of project, to your root project directory.

So, to use, go to the Command Palette, and type gitignore, and select Generate .gitignore File. A selection box will pop-up (see below):

Screenshot of selection menu.

It will generate a .gitignore file based on the gitignore API.

Have a nice day.

Posted on by:

eclecticcoding profile



Fullstack development looking for first Remote position. Recently Graduated from @FlatIron School #HireMe.


markdown guide

Hello nice post, but please not fully upcase on your title 🙌


Sorry was an oversite but glad you enjoyed the post.