Should I commit .gitignore file? [duplicate]
After reading proper section of GitHub Help I got completely lost. It says:
This file can be committed into the repository, thus sharing the rule list with any other users that clone the repository.
Up until now, people I've been talking to about Git were telling me that ".gitingore
file must be committed or else its rules won't work!"
Every Git begginer's question: "Why .gitignore
rules are not applied?"
Could be answered with a simple: "Did you commit it?".
And now, here comes the GitHub Help saying, that this file can be commited, but it isn't necessary
Yes, you can track the .gitignore
file, but you do not have to.
The main reason of having this file into repository is to have everyone working on the project, ignoring same files and folders.
Also see this: Should you commit .gitignore into the Git repos?