how to unstage a file in git after commit code example Example: how to unstage a commit git reset HEAD~