Delete the Previous Commit in Git

This page answers questions like these:


Related Links:
Revert Uncommitted Changes in Git



Delete the Previous Commit in  git

git reset --hard HEAD^

Delete the Previous 2 Commits in  git

git reset --hard HEAD~2

Delete the Previous 3 Commits in  git

git reset --hard HEAD~3




Related Links:
Revert Uncommitted Changes in Git

Home  >  Git  >  Delete the Previous Commit in Git


Tags: git delete commit, git delete previous commit, git remove commit, git undo commit, git reverse commit, git rollback commit, git, linux, unix, solaris, bsd, aix

Copyright © HelpDoco.com
git-delete-previous-commit.txt
Git/git-delete-previous-commit.htm
4