how to undo all changes made in git branch code example Example: git undo all changes git reset --hard