git reset --soft HEA code example
Example: "git reset –- soft head^"
git reset --soft HEAD^ #The command to undo a commit and reset to the commit before HEAD and keeping the changes is:
git reset --soft HEAD^ #The command to undo a commit and reset to the commit before HEAD and keeping the changes is: