Quick summary
To undo a commit in GitHub, you can use the Revert feature inside a Pull Request, which creates a new commit that safely reverses the selected changes without altering your repository's history.
Steps
- In your Pull requests tab, click on the pull request you want to work with.
- Find the commit you want to undo, click on it, and then click Revert.
- After reverting, GitHub will automatically create a new commit that undoes the changes made in the selected commit.
- By following these steps, you can undo a commit by using the revert action directly in GitHub.
.gif)



