Sometimes when you need to quickly test something, you replace some variables in the code, which should never make it to production. E.g. fill in some credentials, just to check the connection locally, rather than fetching the acceptance logs. This data should just never-ever-ever reach production, and should actually be removed before committing to the versioning system (git in our case). I was wondering if there was some kind of magical "tag" which you could put in comments for instance, which would make git block the commit. Something like:
somewildparam= 10
anotherparam= fancy_headers
# ![GIT_BLOCK]!
thesecretpassprasetomtgoxcoldwallet=oopsimsorry
And upon git commit -am"Yeah I fixed something!"
:
git: COMMIT FAILED, REASON: GIT_BLOCK tag found. This could cost you money!
Disclaimer: As we all know, a good programmer would ** never ** do such a thing. So, let's say I'm just asking for a friend.