.gitignore file helps to avoid dealing with files that should not be tracked in git. You can easily use "git add ." without going through the files for adding into staging.