RSSCategory: Git



Undo Last Git Commit

Posted by Leave a Comment

Rolling back your most recent Git commit is very easy. Below are examples for two different scenarios.

Delete last commit and restore files to previous state:

git reset --hard HEAD~1

Delete last commit but keep files as they are:

Continue Reading