You can not. GitHub does not have a web API call for this.
The full API can be found here .
What can you do?
Since we donβt have shell access on Chromebooks ...
You can always go back locally, and then press the -f code to force the code to be pressed, but since you donβt have a command line for this, you will need to manually return the code and commit the "old" "back.
If you have the option of using the CLI rather than the GitHub website, take a look at this answer. It will be very helpful for you. It details how to undo commit in various ways using the CLI.
How to move HEAD back to the previous place? (Separate head)
source share