Answers for "undo reset git"

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}
Posted by: Guest on September-01-2020
2

git revert all commits to pervious commit

git revert --no-commit <commithash>..HEAD #revert changes in range of commits from head to back to that commit hash
Posted by: Guest on September-22-2020
0

git revert to old commit

git reset --hard c14809fa
Posted by: Guest on December-28-2020
1

revert or reset git

git reset	Commit-level	Discard commits in a private branch or throw away uncommited changes
git reset	File-level	Unstage a file
git checkout	Commit-level	Switch between branches or inspect old snapshots
git checkout	File-level	Discard changes in the working directory
git revert	Commit-level	Undo commits in a public branch
git revert	File-level	(N/A)
Posted by: Guest on May-14-2021

Browse Popular Code Answers by Language