git soft reset head 1 code example
Example 1: git reset hard
git reset --hard
Example 2: git reset
git reset --soft HEAD~3
git commit
git push —force-with-lease origin
Example 3: git reset soft
git reset --soft
Example 4: reset to commit
# rollback to commit state
git revert --no-commit 0766c053..HEAD
git commit