Summary: How to download a default .gitignore file into your project directory
I create new node.js projects in my local git-repo. To include a default gitignore-file I download it from github.
First cd into your project folder , then issue this command:
1 |
$ wget https://raw.githubusercontent.com/github/gitignore/master/Node.gitignore -Outfile .gitignore |
This places a .gitignore into your project directory with this content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# Logs logs *.log # Runtime data pids *.pid *.seed # Directory for instrumented libs generated by jscoverage/JSCover lib-cov # Coverage directory used by tools like istanbul coverage # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) .grunt # node-waf configuration .lock-wscript # Compiled binary addons (http://nodejs.org/api/addons.html) build/Release # Dependency directory # https://www.npmjs.org/doc/misc/npm-faq.html#should-i-check-my-node_modules-folder-into-git- node_modules |
Of course, the contents of this file might change over time.
See Getting a new node project started with npm. Unfortunately the wget-url on this post is wrong, the above url is correct.