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

How to Revert a Commit in Github



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

  1. Go to your repository on GitHub.

  2. Select the 'Pull requests' tab.

  3. Locate the pull request that you want to revert a commit.

  4. Click 'Revert'. This will create a new commit that undoes the changes made by the specific commit.

Quick answer: To revert a commit in GitHub, go to your repository, select the Pull requests tab, locate the desired pull request, and click Revert to create a new commit that undoes the changes.

About this GitHub tutorial

Undo unwanted code changes easily on GitHub by navigating to your repository, locating the pull request, and clicking the Revert button. This guide shows how to revert a Commit in Github in 4 steps, starting with "Go to your repository on GitHub" and finishing with "Click 'Revert'. This will create a new commit that undoes the changes made by the speci...". 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 revert 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 Revert a Pull Request in Github, How to Revert to a Previous Commit in Github and How to Search Code 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