How to roll back a repo to its previous commit on Github

Опубликовано: 28 Апрель 2026
на канале: BuildWithData
7,458
13

Have you ever found yourself in the situation where you merge a pull request on Github and a few seconds later you find an error ?

Well I'm sure you have once at least and you wished you did not and you wondered how to delete that merge commit from the master branch but you did not find a way.

In this episode we will learn exactly how to get this done: how to roll back a repository to its previous commit on Github.

Timestamps
00:00 | intro
01:06 | create and merge a pull request with an error
03:20 | git reset
04:01 | git push —force
04:40 | proceed master branch
05:42 | remove protection rules
06:40 | add back protection rules

––––––––––––––––––––––––––––––
Mitsubachi by Smith The Mister https://smiththemister.bandcamp.com
Smith The Mister https://bit.ly/Smith-The-Mister-YT
Free Download / Stream: http://bit.ly/mitsubachi
Music promoted by Audio Library    • Mitsubachi – Smith The Mister (No Copyrigh...