0

What is the command to rollback the git repo to its empty/default state?

2
  • Just remove the .git directory.
    – bdecaf
    Commented Feb 20, 2012 at 6:14
  • (Your title is misleading.) Note that removing the .git directory also removes your staged content, which is not the same as unstaging files (which would be git reset).
    – jørgensen
    Commented Feb 20, 2012 at 6:24

1 Answer 1

2

You can init a new repo

rm -rf .git
git init

If you don't even want the files, just start a new repo.

PS: You might want to explain what you really want to achieve and why, as there maybe a better way to approach what you are doing.

Not the answer you're looking for? Browse other questions tagged or ask your own question.