Quick summary
To delete a commit in GitHub, navigate to the Pull Requests tab, open the relevant request, and use the Revert option to create a new commit that undoes the unwanted changes. This method safely removes a commit from your branch history without rewriting it.
Steps
- Go to the Pull Requests tab in your GitHub repository and click on the pull request you want to modify.
- Find the commit you want to undo, click on it, and then click the Revert button.
- GitHub will automatically create a new commit that undoes the changes made in the selected commit.
- By completing these steps, you have successfully deleted a commit by reverting it in GitHub.
.gif)



