4 ms·
It's something that almost happened to me too. A git repository for a project that at first, in the prototype-stage, had credentials hard-coded, but inevitably
by relix 16y ago
It's something that almost happened to me too. A git repository for a project that at first, in the prototype-stage, had credentials hard-coded, but inevitably moved on to be config-file-driven.
I concocted the following command to change all mentions of a specific word to another word, in a git repository:
git filter-branch --tree-filter "find . -type f -exec sed -i -e 's/originalpassword/newpassword/g' {} \;"
Use this to check if there are any mentions of some word, e.g. your password, in the repository:
git filter-branch --tree-filter "grep -r originalpassword * || true"