04 March 2016

Generate a gitignore for Netbeans, Eclipse, IntelliJ Idea, Gradle or anything else!

I've written about gitignore for Netbeans, but recently came across something much better. There's actually a gitignore generator which can generate the file and folder list that Git should ignore. It's available for 255 types of IDE's, OS'es etc.

Either just type the name of the IDE, OS or programming language and click "Generate"...

OR

... install the commandline version of it and at the terminal, simply type:

gi <IDE or language or OS name>

and the custom gitignore gets generated.

or if you want to directly generate the file, just add the redirection operator:

gi <IDE or language or OS name>  >>  .gitignore

or if you don't want to generate specific gitignores for every project, simply generate a global one.

Eg:
gi linux, netbeans >> ~/.gitignore_global



As simple as that. It's quite amazing that someone took the time to actually create a gitignore generator. Thoughtful, and very much a gem for programmers around the world!



A little video if you still need help:

No comments: