How can I completely remove a file from a git repository?

Viewed 33439

I noticed recently that the project files my text editors use (along with some other junk) got added the git repository for the project. Since they aren't actually part of the project, I'd like to remove them, but git rm doesnt remove the old versions from the repository, and I couldnt find anything else that looks promising.

3 Answers

It's now recommended to use git-filter-repo instead. Running git-filter-branch actually prints:

WARNING: git-filter-branch has a glut of gotchas generating mangled history
Related