DEV Community

Cover image for npx gitignore
Nick Taylor
Nick Taylor Subscriber

Posted on • Updated on • Originally published at iamdeveloper.com

npx gitignore

I've done this a few times on a live stream and there is always someone unaware of this so I wanted to share.

Assuming you have Node.js installed on your machine, you can run npx gitignore your_language, e.g. npx gitignore node, and it will generate a gitignore file for you for the given language.

Here's a clip from my stream today showing it in action. Maybe you'll find it useful in your next project!

Photo by Gabriel Heinzer on Unsplash

Top comments (9)

Collapse
 
rxliuli profile image
rxliuli • Edited

I added the sync subcommand to my self-created liuli-cli to synchronize configuration items

$ liuli-cli sync init
? Please select a configuration item to sync...
√ gitignore
√ jest
√ eslint-ts
√ commitlint
√ prettier
√ simplehooks
Enter fullscreen mode Exit fullscreen mode
Collapse
 
nickytonline profile image
Nick Taylor

Noice!

Collapse
 
retronav profile image
Pranav Karawale

Nice handy tool so that I don't have to curl the Node.gitignore file everytime 🙌

Collapse
 
nickytonline profile image
Nick Taylor

Amy Poehler being cool

Collapse
 
thomasbnt profile image
Thomas Bnt ☕ • Edited

Badass command 😎

(Also cool to integrate Twitch video in your post)

Collapse
 
nickytonline profile image
Nick Taylor

Chow Yun-fat giving a thumbs up

Collapse
 
diballesteros profile image
Diego (Relatable Code)

Useful tip, thanks for sharing!

Collapse
 
nickytonline profile image
Nick Taylor

Actor Leonardo DiCaprio as Gatsby doing a cheers

Collapse
 
wrench1815 profile image
Hardeep Kumar

Hol' up. Wait a minute. It was this simple? Sheesh. -_-