Super quick tip I use all the time but people may not be aware - @github maintains a list of gitignores (with 161k ⭐️!) for every single language and you can clone them into your project with a oneliner:

npx gitignore <language>

Just in case someone here doesnt know, now you do.

The git repo containing the .gitignore files is here.

source