In mercurial, I used to do hg up 00to completely clear the working directory.
Resets the working directory to it immediately after execution hg init.
Is there any equivalent in git?
Note that it hg up 00does not match the hg up 0one that is upgraded to the first version; instead, it is equivalent hg up null, for only a couple of characters shorter to enter. * 8' )
Also note that I do not want to just do rm -rf *git in the root directory of the working directory, since then it git statuswill show all files as deleted. I just want to update the repository to the state before the first commit. Alas, my internet searches and git guides did not provide me with the information I need to develop how to do this git.
As a background, I want to leave the repository in place so that I can easily check for another commit later. One of the reasons I want to do this is because I have a very large repository (actually it’s git svn repo) and I don’t want me to have to repeat it again (it took several days to finish, and you aren supposed to clone gitsvn repo). I really want to free up the space occupied by the working copy when I do not need it.
source
share