git reset without unstaged code example Example 1: revert unstaged changes git git checkout -- . Example 2: what to do with unstaged changes after reset git rm --cached -r .