Hacker News new | ask | show | jobs
by rhythmvs 4154 days ago
Not as generic a solution as ignoring lines on commit (whatever they may contain or for whatever reason you want to hide them), but when it comes to protecting credentials, crypto for arbitrary chunks of text comes in handy.¹ The fact that the encrypted string is being committed still might be a good thing: as the code is run an error will be thrown as a reminder to either decrypt or replace the string with one’s own creds.

¹ https://packagecontrol.io/packages/Transcrypt