Pablo Rodríguez <> writes:

> Dear list,
> I wanted to initialize a git repo in a directory, but I mistakenly
> reinitialized an existing repo in another directory.
> Two basic questions:
> - How can I undo this? (All files from this repo have been removed [as
> anyone should expect].)
> - If there were some uncommited modifications in the now deleted files,
> would it be a way to recover also these modifications?
> Many thanks for your help,

I think it would help to know what exact commands you ran, and have an
example of what you want to undo.

My quick testing suggests that the man page for git-init is correct when
it states that

  Running git init in an existing repository is safe. It will not
  overwrite things that are already there.


Magnus Therning              OpenPGP: 0x927912051716CE39
email:   jabber:
twitter: magthe     

If our ideas of intellectual property are wrong, we must change them,
improve them and return them to their original purpose. When
intellectual property rules diminish the supply of new ideas, they
steal from all of us.
     — Andrew Brown, November 19, 2005, The Guardian

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Attachment: signature.asc
Description: PGP signature

Reply via email to