In mercurial, I am used to being able to do hg up 00
to completely clean out the working directory.
This resets the working directory to it's state immediately after having performed the hg init
.
Is there any equivalent in git
?
Note that hg up 00
is not the same as hg up 0
, which updates to the first revision committed, instead it is equivalent to hg up null
, just a couple of characters shorter to type. *8')
Also note that I don't want to just do an rm -rf *
in the root of the git working directory, as then git status
will show all of the files as having been removed. I just want to update the repository to it's state prior to the first commit. Alas my searches through the web and the git manuals haven't furnished me with the info I need to work out how to do it in git
.
As background, I want to leave the repository in place so that I can easily checkout a different commit later. One reason I want to do this is that I have a very large repository (actually a git svn repo) and I don't want to have to ever have to re-clone it again (it took days to complete and you aren't supposed to clone a gitsvn repo). I do want to be able to free up the space taken by the working copy when I don't need it though.