git rollback all code example Example 1: how to undo git clean -fd command git clean -fdx Example 2: clear local changes in git git checkout .