Answers for "git reset hard to specific commit"

5

git hard reset to commit

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

git set head to commit

# Set a new HEAD to a branch
# Note that commit can be a commit hash or tag or another branch
git reset --hard $COMMIT
Posted by: Guest on November-22-2020
0

reset to commit

# rollback to commit state
git revert --no-commit 0766c053..HEAD
git commit
Posted by: Guest on April-10-2020

Browse Popular Code Answers by Language