Discard staged changes git code example Example: git discard staged changes git reset HEAD git checkout .