how to remove all changes of local github code example Example 1: git undo all changes git reset --hard Example 2: revert unstaged changes git git checkout -- .