If you're like me, you pretty much Google "gitignore templates" each time you start a new project from scratch. That's at least 15 seconds you'll never get back, so I made a command-line tool for that π€·ββοΈ
Introducing gitignore-it, here's how it works:
Feel free to install it globally, it's super lightweight and will save you a few seconds.
If you want to contribute, you can always create new .gitignore files that will be usable right away.
And if I've saved you those vital few seconds at the beginning of your project, feel free to give it a little βοΈ Github Link

Oldest comments (21)
Cool!
Can I multiple select? Like as Node, VSCode, MacOs... ?
It could be an option in the future, for now it's one
gitignoreat a timeSuper cool.
I was willing to learn about in near future but I came across this.
Will help a lot.
Thanks.
I made something similar which I am using locally. I called it Gnit, it git init and also ask for the .gitignore folders to add and also select base on language. It is written in python, I can share with anyone tho.
Great, will love to see your code.
Yeah that could be the next step, I could parse the user's package.json (or equivalent file) and generate a gitignore based on that :)
Just curious how this differs from the gitignore package that consumes GitHub's awesome gitignore repository.
A collection of useful .gitignore templates
A collection of
.gitignoretemplatesThis is GitHubβs collection of
.gitignorefile templates We use this list to populate the.gitignoretemplate choosers available in the GitHub.com interface when creating new repositories and files.For more information about how
.gitignorefiles work, and how to use them the following resources are a great place to start:Folder structure
We support a collection of templates, organized in this way:
Globalcontains templates for various editors, tools and operating systems that can be used in different situations. It isβ¦Hey, thanks for sharing this package, I did not know of its existance. I did know of Github's list though as I've used it.
At the moment, the only difference is that I prompt the user for a language. Eventually, I'd like to generate the gitignore automatically based on the user's environment.
That would be great adding the .gitignore during scaffolding automatically based on the environment.
A service I use often for the same purpose is: gitignore.io/
This is nice. Many times in the past I copy-pasted the content of one of the sample gitingore for various programming languages that are maintained on GitHub here github.com/github/gitignore
Looks like you've made a nice time saving tool right there! π
Create an alias to Git to write:
... etc. I have an alias
git excludetoo.Man, you have got a solution to my problem
How does it work? i tried installing it on my machine and i run gitignore but i am getting gitignore command not found
Did you install it globally?
npm i -g gitignore-itYes, I followed the instructions on npm, I am using windows
I had same problem, command not found and I restarted VS Code and my cmd's.