Completely remove file from all Git repository commit history

Visto en

# Create a new branch at the parent-commit of the commit that you want to remove
git branch temp

# Rebase onto the parent-commit, starting from the commit-to-remove
git rebase --preserve-merges --onto temp master

# Or use `-p` insteda of the longer `--preserve-merges`
git rebase -p --onto temp master

# Verify your changes
git diff master@{1}