TroubleChute Logo
VIDEOS

Deleting commits | How, why and why not | GitHub Tutorial


Published: Aug 2, 2021
Last Edit: Aug 2, 2021
109 Words, 0 Minute.

Watch the video:


Timestamps:
0:00 - Explanation
0:17 - Why?
0:44 - Creating commits to delete
1:51 - Deleting commits from GitHub
3:29 - Why you DON'T want to delete commits

Made a mistake and want to undo or hide it from GitHub? Well, it’s not the best to delete commits, but here’s a step-by-step guide on how to do it. The video also touches on the only true ways to delete commits, and why you may or may not want to attempt to do so. By the end, you should have a better idea of how to delete commits, and why.

  1. git reset –soft HEAD~1
    2. git push origin +main –force
TroubleChute © Wesley Pyburn (TroubleChute)
Support Me Privacy Policy Cookies Policy Terms of Service Change privacy settings Contact