It would actually be a nice to build an optional warning feature into `git` itself. You could download some known common issues and the script would generate warnings if you checked in corresponding code. E.g.
git add id_rsa
WARNING: You may have just staged a private key.
or better
echo '{"password": "mypassword"}' > config.json
git add config.json
WARNING: You may have just staged a password.