How can I cleanup git working file set (like hg up -r null)?
So only $proj/.git hierarchy present and git st don’t show D (deleted).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
After clarifications in your comments, it seems that you want to create a new root commit in your repository. There’s a description of how to do this in the git community book.
First, make sure that the output of
git statusis clean, so that you don’t lose any of your previous work unintentionally. Then if you do the following:Then you will be on a new branch called
newbranch, with a single root commit with an empty tree. If you then decide that you want this to be your new master branch, you can do:… which renames your old
masterbranch tooldmaster, and then renames the newnewbranchbranch tomaster.