git checkout -b old-state code example Example: undo git pull git reset --hard master@{"10 minutes ago"}