How to Revert to a Previous Commit in Github



Guide

  1. Go to your repository on Github and click on the 'Commits' link.

  2. You will be directed to the commit history and click on the clipboard icon to copy the unique ID of the commit you want to revert.

  3. Go to the visual studio code, open up a terminal and type 'git revert' and past the unique ID or if it's a merge commit type m1 and paste the hash.

  4. It creates a new commit that undoes the changes introduced by a specific commit. Your history remains intact.

  5. By following these steps, you can easily revert a previous commit.

🚀

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