git reset hard local changes code example Example 1: git delete changes git clean -df git checkout -- . Example 2: how to undo git clean -fd command git clean -fdxn