Tuesday, March 20, 2018

git reset --hard HEAD~1

As a Git Bash command, this is going to throw away the most recent commit to your branch. (Using "soft " instead of "hard" will unwind the changes while destroying the commit to your branch. The uncommitted changes will be back at your source code however instead of being reverted.)

No comments:

Post a Comment