Is there a command to undo git init?

Yarin picture Yarin · Jul 9, 2010 · Viewed 383.6k times · Source

I just Git init'ed a repos with a wrong user, and want to undo it. Is there any command for this? Do I actually have to go in and edit the .git directory?

Answer

Matthew Flaschen picture Matthew Flaschen · Jul 9, 2010

You can just delete .git. Typically:

rm -rf .git

Then, recreate as the right user.