1 min episode 14 of 17
Transcript
Deleting Old Commits
In this episode, we will delete a revision from our commit history.
You probably already know that Git offers a couple of tools to “undo” commits - like reset or revert. But if you want to really delete a commit from the middle of your history, you can do that too!
First of all, make sure that you have the current HEAD branch selected - because we can only manipulate the history of the currently checked out branch.
Let’s say we’d like to delete this “Change page structure” commit here. We can simply right-click that commit and then select “Delete” from the menu.
And that’s already it! We have successfully deleted an old commit from our history!