Explanation To entirely remove unwanted files from a repository's history you can use either the git filter-branch command or the BFG Repo-Cleaner open source tool. Reference: https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/removing-sens