What Node.JS-specific files and folders are usually excluded via .gitignore?
Gitnode.jsGit Problem Overview
I'm a newbie Node.JS developer...
What do developers usually exclude from their Node.JS git repositories in production via .gitignore?
node_modules? bin? Etc...
Git Solutions
Solution 1 - Git
GitHub has created a repository to answer this kind of questions for several languages/frameworks, including one for NodeJS.
https://github.com/github/gitignore/blob/master/Node.gitignore
Here is the current one for reference :
lib-cov
*.seed
*.log
*.csv
*.dat
*.out
*.pid
*.gz
pids
logs
results
build
node_modules
Solution 2 - Git
Easiest way to check that out is to look at the most popular Node.js modules on github:
https://github.com/visionmedia/express/blob/master/.gitignore
https://github.com/senchalabs/connect/blob/master/.gitignore
https://github.com/nodejitsu/forever/blob/master/.gitignore
https://github.com/LearnBoost/socket.io/blob/master/.gitignore
Solution 3 - Git
As a start:
.DS_Store
thumbs.db
*.log
node_modules/
Add your config.json
, compiled .js
if you're using coffeescript, etc.
Solution 4 - Git
> You can do it on the site gitignore.io.
gitignore.io is a web service designed to help you create .gitignore files for your Git repositories. The site has a graphical and command line method of creating a .gitignore for your operating system, programming language, or IDE.
> Link to .gitignore only for Node.js.
Video tutorial for the service.