Wednesday, February 25, 2015

Revert the last commit and its change in Git

To revert the last commit and its change in Git,

do the following:

git reset --hard HEAD~1

Reference:
http://stackoverflow.com/questions/927358/how-to-undo-the-last-commit

No comments:

Post a Comment