A .gitignore in a project should only cover artifacts caused by the contained source code, not those caused by the personal choice of editor and/or environment of a developer. https://t.co/xAWbf0pbPR
— Markus Tacker 🇳🇴 (@coderbyheart) January 3, 2020
This is explained in detail here.