The .gitignore file for a project should only contain files directly related to that project, not anything that might vary by OS or editor or IDE, because this just clutters things up.
James, thank you for your response. You are correct, this approach I use does create a large .gitignore file. In a perfect scenario, all contributing users would maintain a local global .gitignore file to exclude their own OS and editors, but unfortunately this is not the case. I have contributed on many Open Source projects that were littered with superfluous files. The biggest culprits are editor temporary files. The fix for me is a more robust gitignore file.
You do raise an interesting point though. I will include a new section to the article which includes the global .gitignore and how to properly configure.
I prefer keeping all code including the .gitignore file as clean as possible, even if it means more carefully reviewing each change for stray files (something that project maintainers should be doing anyway) and educating people about how to use a global .gitignore file.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The .gitignore file for a project should only contain files directly related to that project, not anything that might vary by OS or editor or IDE, because this just clutters things up.
These files should be placed in a global .gitignore file for your whole computer instead: help.github.com/en/github/using-gi...
James, thank you for your response. You are correct, this approach I use does create a large
.gitignore
file. In a perfect scenario, all contributing users would maintain a local global.gitignore
file to exclude their own OS and editors, but unfortunately this is not the case. I have contributed on many Open Source projects that were littered with superfluous files. The biggest culprits are editor temporary files. The fix for me is a more robustgitignore
file.You do raise an interesting point though. I will include a new section to the article which includes the global
.gitignore
and how to properly configure.Again, thank you for your contributions.
I prefer keeping all code including the .gitignore file as clean as possible, even if it means more carefully reviewing each change for stray files (something that project maintainers should be doing anyway) and educating people about how to use a global .gitignore file.