GIT RESET WITH SOFT HEAD code example Example 1: git reset soft head $ git reset --soft HEAD~1 Example 2: git reset soft git reset --soft