2

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?

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
Mr. Coxall
  • 191
  • 3
  • 9

1 Answers1

1

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"

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250