A tool to remove API keys within a github repo by overwriting history. Requires everybody who’s cloned to repo to re-clone, so that they don’t keep the old history.

Usage

  1. git clone https://github.com/newren/git-filter-repo.git
  2. ./git-filter-repo --sensitive-data-removal --invert-paths --path src/google-services.json --force
  3. Check affected branches grep -c '^refs/pull/.*/head$' .git/filter-repo/changed-refs
  4. If there is no affected branches, then push these changes git push --force --mirror origin