Replace a sensitive string in all files

git filter-repo

  • A versatile tool for rewriting Git history.
    See also: `bfg`.
    More information: <https://github.com/newren/git-filter-repo>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

git filter-repo --replace-text <(echo '{{find}}==>{{replacement}}')

click the source code to copy install git filter-repo on any operating system with command-not-found.com