Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset or revert Gist to an older commit state using either Github web interface or desktop app

I am trying rollback a Gist to an older state through either the web interface or the Github Desktop app. I've seen solutions that seem to show how one might do this using the command line. However, I can't figure out how one can do this without using the Command Line Interface.

Is the CLI the only way to rollback history? If so, is there a reason for this limitation of the web interface and desktop app?

like image 278
skube Avatar asked Sep 02 '15 11:09

skube


1 Answers

git clone

Use one of the following URIs to clone your git

$ git clone [email protected]:<gist_hash>
$ git clone [email protected]:<gist_hash>.git

# navigate to directory
$ cd <gist_hash>

rebase

Update your branch however you'd like, using rebase for example

$ git rebase --interactive
pick 8c199dc 8c199dc373b5be96df92131e3c0631514636583d
- pick dc968d3 dc968d3e2cb3a571ed50233047c3d83ba3f6e209

force push

You'll have to force push up your changes to overwrite previous commits

$ git push -f
like image 86
YumaInaura Avatar answered Sep 19 '22 12:09

YumaInaura