git reset HEAD~

After making changes

git add <file>
git commit --amend "message"

References:

  • https://stackoverflow.com/questions/927358/how-do-i-undo-the-most-recent-local-commits-in-git