LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt

How to Delete a Commit in Github



How to Delete a Commit in Github: step-by-step guide

  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.

Quick answer: 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.

About this GitHub tutorial

Remove unwanted changes on GitHub by navigating to your pull requests, selecting the target commit, and reverting it to create a new undo commit. This guide shows how to delete a Commit in Github in 4 steps, starting with "In your 'Pull requests' tab, click on the request" and finishing with "By following these steps, you can delete a commit by reverting the commit in Github". The interactive demo above is a click-through copy of the real GitHub interface, so you can rehearse each step before doing it in your own account.

Frequently asked questions

How many steps does it take to delete a Commit in Github?

4 steps. Each one is listed in order above, and the demo highlights exactly where to click.

Can I try it without changing my own account?

Yes. Clicking through the demo doesn't touch your GitHub data or settings. Once you know the flow, repeat it in your own workspace.

This tutorial is filed under GitHub. Related guides: How to Delete a Fork in Github, How to Delete a Forked Repository in Github and How to Delete a Pushed Commit in Github. Last reviewed 05 Oct 2026.

LiveDemo - Open-source alternative to Storylane, Navattic, and Arcade | Product Hunt
🚀

Create your first interactive demo in minutes

No credit card required • Start building today

Start free→

This website uses cookies to enhance the user experience.

AcceptDecline