tags:

views:

56

answers:

1

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

+4  A: 

If you just inited it, you can just delete .git. Typically:

rm -rf .git

Then, recreate as the right user.

Matthew Flaschen
Thanks Mathew, but can you expound on "if you just inited it"- what if i've done some stuff since, a few commits etc, would simply removing this be a problem?
Yarin
No, you can always just remove the entire `.git` subdirectory with no ill effects.
mskfisher
Great thanks guys
Yarin
@mskfisher: No ill effects besides your repository being gone, that is!
Jefromi