Simplify .gitignore

Hello everybody.

I’m on RC4, and I think there are some lines in .gitingore that could be removed and/or optimized.

This is what I got by default:

 # Specifies intentionally untracked files to ignore when using Git
 # http://git-scm.com/docs/gitignore`

 *~
 *.sw[mnpcod]
 *.log
 *.tmp
 *.tmp.*
 log.txt
 *.sublime-project
 *.sublime-workspace
 .vscode/
 npm-debug.log*

 .idea/
 .sass-cache/
 .tmp/
 .versions/
 coverage/
 dist/
 node_modules/
 tmp/
 temp/
 hooks/
 platforms/
 plugins/
 plugins/android.json
 plugins/ios.json
 www/
 $RECYCLE.BIN/

 .DS_Store
 Thumbs.db
 UserInterfaceState.xcuserstate

Now, these are my suggestions and questions:

  • These are OS or IDE/Editor related files/directories which should be in everyone’s global .gitignore file IMHO:

      *.sublime-project
      *.sublime-workspace
      .vscode/
      .idea/
      $RECYCLE.BIN/
      .DS_Store
      Thumbs.db
    
  • The following is already included in the node_modules/ entry:

      npm-debug.log*
    
  • The following are already included in the plugins/ entry:

      plugins/android.json
      plugins/ios.json
    
  • This one, if I’m not mistaken, is an XCode file, which is already included in the platforms/ entry:

      UserInterfaceState.xcuserstate
    
  • I’m not sure about the following, but they look like third party library related folders, which by default are not ionic depencencies. If that’s the case, I also think they should be removed.

      *.sw[mnpcod]
      .tmp/
      .versions/
      coverage/
      dist/
      tmp/
      temp/
    
  • Why is the hooks/ cordova directory ignored? It shouldn’t, if I’m not wrong.

  • Some of these entries should have a leading slash, otherwise I would not be able to create directories/files with these names inside my sources. Yes, they are not common names, but I should be able to create them.

So at the end, my .gitignore looks like this:

*~
*.log
.sass-cache/
node_modules/
/platforms/
/plugins/
/www/

# Not sure about the following, but my IDE flags them as "not used"
*.sw[mnpcod]
*.tmp
*.tmp.*
log.txt

What do you think about it?

PD: My apologies if I didn’t explain well, english is not my first language.