1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-22 09:02:08 +02:00
tldr/pages/common/git-reset.md
2016-09-26 23:19:39 +05:30

297 B

git reset

Undo commits or unstage changes, by resetting the current git HEAD to the specified state.

  • Undo last commit, keep the changes in the local filesystem:

git reset HEAD~1

  • Undo last commit, permanently delete the changes, and discard staged changes:

git reset --hard HEAD~1