Loading tutorials
Intermediate · Mid: 14 chapters · 34 min read. States assumed prerequisites
Start readinggit filter-repo. It assumes you can clone, commit, branch, and push, and that you know commits are identified by hashes. Once you see why a rewrite changes every hash after the edit, the later steps (verifying, force-pushing, telling collaborators to re-clonegit-filter-repo in a fresh clone, as covered in earlier chapters.git filter-repo at least once with --replace-text. If not, go through those chapters first.git filter-repo on a fresh clone, using either --invert-paths or --replace-text. You should be comfortable with git log, git grep, and git rev-list. Verification comes before the force-push, because a push cannotgit filter-repo, and have verified that the secret no longer appears in any ref. It also assumes you have permission to force-push to the repository.git filter-repo, verified the result, and force-pushed. Those steps clean the branches and tags you pushed. They do not clean every copy of the old history.git fetch, git merge, and git format-patch at a basic level.