undo git reset HEAD~1
# if you would like to move back the head by one position you could do:
git reset HEAD~
# if you want to move multiple positions at once e.g 3 times back type:
git reset HEAD@{3}
undo git reset HEAD~1
# if you would like to move back the head by one position you could do:
git reset HEAD~
# if you want to move multiple positions at once e.g 3 times back type:
git reset HEAD@{3}
what does git restore do
The "restore" command helps to unstage or even discard uncommitted
local changes.
One the one hand, the command can be used to undo the effects of
git add and unstage changes you have previously added to the Staging
Area.
On the other hand, the restore command can also be used to discard local
changes in a file, thereby restoring its last committed state.
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us