reset 1 commit code example
Example 1: git reset initial commit
git update-ref -d HEAD
Example 2: reset to commit
# rollback to commit state
git revert --no-commit 0766c053..HEAD
git commit
git update-ref -d HEAD
# rollback to commit state
git revert --no-commit 0766c053..HEAD
git commit