how to undo a commit in git without losing them code example
Example 1: reset last commit without losing changes
git reset HEAD~1 --soft
Example 2: remove the last commit git without losing changes
git reset HEAD~1 --soft
git reset HEAD~1 --soft
git reset HEAD~1 --soft