how to clear changes to git code example Example 1: git delete changes git clean -df git checkout -- . Example 2: clear local changes in git git checkout .