git reset SOFT head-- code example
Example 1: git soft reset head
git reset --soft HEAD^
//resets head by 1
Example 2: "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:
Example 3: git reset soft
git reset --soft