Skip to content

Instantly share code, notes, and snippets.

@kisildev
Created August 15, 2019 08:25
Show Gist options
  • Save kisildev/41f9a9348e7949876d81a6d4cf42b7a5 to your computer and use it in GitHub Desktop.
Save kisildev/41f9a9348e7949876d81a6d4cf42b7a5 to your computer and use it in GitHub Desktop.
How to delete a commit on Github (Git)
How to delete a commit on Github
1. We get the hash code of the commit that we want to return to.
2. Go to the repository folder and write to the console:
$ git reset --hard a3775a5485af0af20375cedf46112db5f813322a
$ git push --force