I just created a Github repository and was wondering what the .gitignore
file was for. I started by not creating one, but added one due to the fact that most repositories have one.
Do I need to have one? Can/do I just ignore it, or does it have a use?
I did some research on the subject but couldn't find a concrete explanation.
.gitignore
tells git which files (or patterns) it should ignore. It's usually used to avoid committing transient files from your working directory that aren't useful to other collaborators, such as compilation products, temporary files IDEs create, etc.
You can find the full details here.