reset local commit keep changes code example
Example 1: git reset keep changes
git reset HEAD^ --soft
Example 2: undo last commit but keep changes
git reset @~
Example 3: git revert commit but keep changes
git reset HEAD^
git reset HEAD^ --soft
git reset @~
git reset HEAD^