I cloned a repository, toyed around a bit and (oops) made a mess of my code. Now I just want to revert to a clean clone of the repository code and start over.
I attempted to use the following from the terminal of the working directory:
git reset --hard # deletes watched filed in local working directory and staged area
git clean -n # shows what will be deleted without actually deleting anything (for the faint of heart)
git clean -f # deletes unwatched files
However, when I run git status
, it still shows the messy files.
Is there a recommended way to reset your machine to the latest check in?