Answers for "how to reset head to certain commit git"

4

git reset to commit

# reset to specefic commit
git reset --hard <commit id>

# to go back one step 
git reset --hard HEAD~1

# note: use --soft to keep file changes
Posted by: Guest on March-05-2021
5

git hard reset to commit

git reset --hard HEAD
Posted by: Guest on May-12-2020

Browse Popular Code Answers by Language