EDIT: it's actually his address, I thought it was just a coincidence but you can the house on Street View... I removed the actual name as doxxing isn't great, sorry.
I was actually thinking "better not commit that" ... before, y'know, I committed it :/
It will let you approve each hunk in a file to commit or not.
git commit -e -v
Will force you to edit the commit message and in the editor show you the diff of the commit against HEAD.
That looks like a much more useful tool, though.
https://gist.github.com/hraban/10c7f72ba6ec55247f2d
Every time you write some code you need to remember removing before commit, surround it with a comment containing "NOCOMMIT". With this script as a pre-commit hook, git will echo an error message and fail.
E.g.:
print("debug: ", myval)
becomes: print("debug: ", myval) # NOCOMMIT
I end up relying on this every day I program. Can't go back.I ended up using a "env.h" file... is there a C-equivalent of the PHP (?) .env file?