# How to Delete a Commit in Github

> To delete a commit in GitHub, open the request in your Pull requests tab, click the commit you want to undo, and select Revert to create a new commit that undoes the previous changes.

Canonical: https://livedemo.ai/tutorials/how-to-delete-a-commit-in-github/
Apps: GitHub
Updated: 2026-10-05
Interactive demo: https://story-api.livedemo.ai/workspaces/62255d3d3304f17b8f5e2d03/stories/692a3aefab56e05a00fe2114/preview?step=1

## Steps

1. In your 'Pull requests' tab, click on the request.
2. Find the commit you want to undo, click on it, and then click 'Revert'.
3. After reverting, it will create a new commit that undoes the changes made in the selected commit.
4. By following these steps, you can delete a commit by reverting the commit in Github.
