An example how to filter secrets from git commits.
Warning: This does only clean the commited content, not the local files. Also there is no way to restore secrets from GIT.
$ cp git-filter-secrets /usr/local/bin/
or
$ cp git-filter-secrets ~/bin/
$ git-filter-secrets init
$ echo "*.cfg filter=git-filter-secrets" >>.gitattributes