532
Developer posts secret key on GitHub, loses $40K in 2 minutes
(cointelegraph.com)
This is a most excellent place for technology news and articles.
Better yet you can configure gitignore globally for git. I do this mostly to avoid polluting repo ignore files with my editor specific junk but *.key and similar can help prevent accidents.
https://git-scm.com/docs/gitignore
For personal projects that's definitely a good idea. For team projects I like to keep that stuff in the project still so the "experience" of working in the project is mostly consistent.
I started using git-secret 2 years ago. It's nice for making secrets part of the repo, while not being readable by anyone that isn't explicitely allowed to do so (using GPG).
I think you really need the project specific gitignore as well, to make sure any other contributor that joins by default has the same protections in place.