The Right Code

Home of Greg Bergé. Let's speak about JavaScript.

Add node_modules to .gitignore

If like me, you are tired to create .gitignore in your node projects. Just do this:

echo "node_modules/\nbower_components/" >> .gitignore  

You can also add in your ".bashrc" or in your ".zshrc" the alias:

alias gitignore='echo "node_modules/\nbower_components/" >> .gitignore'  

Congratulations! You will earn 10 minutes a day with this little tip!

comments powered by Disqus