I'm teaching a HTML class on Chromebooks. We're using GitHub for both revision control and I'd like to show my students how to revert a commit. Since we don't have shell access on the Chromebooks I was hoping to find a way to do this online, through the GitHub website. Is that possible? I'm starting to think it might not be.
2 Answers
You can't. GitHub does not have a web API call to do this.
The full API can be found here.
What can you do?
Since we don't have shell access on the Chromebooks...
You can always revert locally and then push your code with -f
to force the code to be pushed, but since you don't have command line to do it you will need to manually revert your code and commit the "old" code back.
If you do have the option to use a CLI, rather than the GitHub website, take a look at this answer. It will be very helpful for you. It describes in detail how to revert commits in various ways using the CLI.
How to move HEAD back to a previous location? (Detached head)

- 1
- 1

- 128,036
- 21
- 144
- 167
-
Asking without taking the time to read the API… Is it possible to do something like selecting a previous commit and doing a pull request on it? Or is there just "no way" – not even an inelegant way? – dlu Feb 09 '16 at 21:00
-
Basically you can but i don't know if you can do it from your tool since you said you don't have CLI. but again. yep it can be done. Read the second answer i added as link it will give you a lot of info what to do, you can also vote up if you like it :-) – CodeWizard Feb 09 '16 at 21:02
You can revert a merged commit by: going to pull requests and change filter for closed:
then chose merge you want to revert and click on revert

- 45
- 8