1) If you have already committed your changes and want to “undo” the changes
git revert
This will create a second commit which undoes the changes of the given commit.
2) Revert the last commit
git revert HEAD
3) Return to the last commited state
git reset --hard
No comments:
Post a Comment