Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Revert to previous point in history in GitHub on the website

Tags:

github

I know I can do this on the command line (git revert), but I need a solution completely on the web. Here is an example of what I am looking for.

I have a repo and it currently has 9 commits.
(https://github.com/Mr-Coxall/Web-12/commits/master)

I would like to revert back the repo to say the 4th commit.

I know I can see the code at that point in history.
(https://github.com/Mr-Coxall/Web-12/tree/aebfeadc4b3fb3a7b90c98b42d24f90a5200f5e5)

Only using the website, how can I make the repo revert back to that commit?

like image 429
Mr. Coxall Avatar asked Dec 05 '25 09:12

Mr. Coxall


1 Answers

Following "Creating and deleting branches within your repository", you can at least create a branch directly from that GitHub page referencing your older commit. (type the name of the new branch in the field, and GitHub will propose to create it from your current tree)

Then you need to rename master (still on GitHub), change the default branch to oyur new branch, and rename your new branch to master: see "Renaming a branch in GitHub"

like image 106
VonC Avatar answered Dec 07 '25 06:12

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!