This boilerplate .gitignore covers a lot of bases when starting new repositories. As a Mac user, some of the additional OSX specific files get in the way. Also, as a vim user, the swap files also creep into the revision history from time to time while vim buffers are still open.

# javascript                                                                                     
node_modules/  
bower_components/  
lib-cov

# scss
.sass-cache/

# temporary and build
.tmp/
dist/

# logs
log/  
logs/  
*.log

# runtime
pids  
*.pid
*.seed

# vim
*~
*.swp
*.swo

# OSX
.DS_Store
.VolumeIcon.icns
.fseventsd
.Trashes
._.Trashes
._.
.Spotlight-V100
Icon^M^M

# windows
[Tt]humbs.db
[Dd]esktop.ini