Undo last commit github

The struggling Developer
3 min readJan 23, 2021


You are busy developing and committed all code to the your central github repository. But then something happened and you need undo the commit on github.


You have two options:

  1. Reversing a commit
  2. Removing the commit (reset head)

In this article I´m showing you Option 2: Removing the commit, also called resetting the head.

Resetting the head to undo the last commit on github needs to be executed locally first…