Git · Maintenance
git filter-repo
Rewrites history to remove files or paths. A separate tool from the Git project.
Syntax
git filter-repo --path <path>Example
Example
git filter-repo --path secrets.txt --invert-paths
More in this group
Learn this in the course
Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.