WestCoastProjects
WestCoastProjects

Reputation: 63062

Revert git repository to prior commit using Github GUI

While there is loads of information available on how to revert to a specific commit using the git command line - e.g. How to revert Git repository to a previous commit?

Is there a way to achieve same using the github gui? There is a feature to revert the latest commit. However I was unable to find options from the Commits history to revert to a specific commit in the list:

When we click on the commit hash button on the right and here is what we see:

[1]: https://i.sstatic.net/Dhu

so there is no feature shown here for Revert to this commit.

Upvotes: 2

Views: 6038

Answers (2)

Anjali Agarwal
Anjali Agarwal

Reputation: 21

Jump to the PR which is included in the commit which is to be reverted. Go to conversation section, there you will see revert option in front of all commits included in that PR (screenshot)

Upvotes: 2

creyD
creyD

Reputation: 2126

You can press the button on the side < > (like in your first picture) and with this you can browse the repository at the time after this commit. Now you can create a pull request or you can download the repository at this very point in time.

I guess there is no other solution if you really want to achieve this in the browser. In GitHub desktop there is the Revert button for each of your commits (screenshot).

Revert button

Upvotes: 1

Related Questions