Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to rollback github repository to a previous commit?

Tags:

git

How do I revert my Github Repository on Github to it's previous state?
I had made some change and committed them to github, but now I want to undo those changes on github. How would I do that?

I tried doing git reset --hard 7727c5bfa99 but that ONLY changed the repository on my computer and not on the github website

like image 675
Karliene Avatar asked Sep 01 '25 22:09

Karliene


1 Answers

you have to push it. git push -f origin master

like image 62
bongya Avatar answered Sep 03 '25 21:09

bongya