How to Delete Commit History with git revert and git reset
This article explains why you might need to remove a commit from Git history, demonstrates how to use git revert to create a new commit that undoes changes while preserving history, and shows how git reset combined with a forced push can completely erase unwanted commits from both local and remote repositories.