changes not staged for commit remove code example Example 1: undo unstaged changes git git checkout -- . Example 2: git delete changes git clean -df git checkout -- .