That file you forget sometimes .gitignore

Like many developers I use git to handle my version control, and with that I sometimes forget a little file called .gitignore.  When I forget that file I end up versioning things that don’t need to be, or cluttering a remote repository with junk no one else wants like ide specific files, a node_modules directory, or any other group of documents and configuration files that would be unique to me.

Here is a basic .gitignore template file I start with for my projects.  You can also find a nice list of other configurations at Sujee Maniyam’s blog.

But here is mine that is set up for Node development using IntelliJ and or Sublime.

Just create a file named .gitignore and place it in the root directory that you are about to run git init.  Tada, no more messy stuff when you add, commit, and push.

## .gitignore file for project
## generic file ignore
## Project file and directory ignore
## IDE Specific ignores
## Node ignore