Use https://gitignore.io to generate a .gitignore file and add it to the repository root directory.
.gitignore