Vigyata.AI
Is this your channel?

How To Delete A Commit From GitHub (Easy Guide)

2 views· 2:42· May 4, 2026

In this video, we discuss how to delete a commit from GitHub by rewriting your local Git history and then using `git force push` to update the remote repository. This comprehensive guide covers both `git reset --hard` to completely remove commits and their changes, and `git reset --soft` to undo commits while keeping the changes staged, offering a flexible way to manage your GitHub workflow and correct commit errors. #DeleteCommitGitHub #GitResetHard #GitForcePush 00:00 Introduction to deletion 00:05 Search for deletion methods 00:18 Overview of commit deletion 00:23 Destructive last commit removal 00:30 Hard reset local commits 00:42 Using the VS Code terminal 00:50 Open new terminal instance 00:59 Count commits to remove 01:05 Execute hard reset command 01:15 Confirm local history update 01:26 Force push remote changes 01:31 Uncommit keeping changes (safer) 01:46 Perform soft reset locally 01:56 Prepare for new commit 02:04 Push local history to GitHub 02:11 Force push with lease 02:23 Update remote repository 02:27 Recap deletion process 02:39 Coordinate with team

🎬 More from AI Mastery