GitXplorerGitXplorer
m

git-clean-secrets

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
269cf7101a9bf5fef2bd537b57fec56f8a995e82

only modify files already tracked by git

mmumbleskates committed 6 years ago
Unverified
89fd515ebad21502a07d7fbf7a5361b2b790cf12

update readme with commands

mmumbleskates committed 6 years ago
Unverified
4ed9e041030f99c26ad2fb6075384ea733df8471

uh oh

mmumbleskates committed 6 years ago
Unverified
b7e6778e7452166822a258c5f11095418997b2b2

make some changes

mmumbleskates committed 6 years ago
Unverified
7968fb43f823cb45f9c5da5f230648e80979aed8

add config file with secret in it

mmumbleskates committed 6 years ago
Unverified
11679d71848a1e1b70648e46eceebb62c791bd3e

first commit with readme

mmumbleskates committed 6 years ago

README

The README file for this repository.

In this repo we have some accidentally included secret token that we have to completely purge from the history.

Command to run to clean the tree in a single commit (in bash):

for file in $(git ls-files | xargs grep -l "$secret"); do sed -i "s/$secret/${secret//?/x}/g" $file ; done ^ list offending files ^ replace the secret with all 'x's

Thus, the full commands might be:

export secret='Gh0sv0ORNBrn@ZEQnI3$yGhXju#DY#sgnmw8m6xe' git filter-branch --tree-filter 'for file in $(git ls-files | xargs grep -l "$secret"); do sed -i "s/$secret/${secret//?/x}/g" $file ; done' HEAD

Try it yourself!