Re: [git-users] undoing git init?

2016-08-15 Thread Pablo Rodríguez
On 08/15/2016 10:58 AM, Magnus Therning wrote:
> 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.

Hi Magnus,

after writing my original message, I checked git init in a brand new
repository and I realized that I deleted the files myself (assuming I
was working on a different repository).

It was all my fault. Next time I will move to trash instead of delete
files. (I copied directories, because it was the fastest way of doing it.)

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] undoing git init?

2016-08-15 Thread Pablo Rodríguez
On 08/13/2016 08:47 AM, Gabby Romano wrote:
> The parent git repo didn't recognise the action you did there? If it
> did, you may try working with tour try to recover the files.in
> general,redoing git init is deleting the .git folder...

Hi Gabby,

after practising with a brand new repository, I realized that I also
removed the files myself (thinking I was doing it in a different
repository).

The problem was that I didn’t realize in which directory (and which git
repo) I was working.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk

-- 
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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [git-users] undoing git init?

2016-08-15 Thread Magnus Therning

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.

/M

-- 
Magnus Therning  OpenPGP: 0x927912051716CE39
email: mag...@therning.org   jabber: mag...@therning.org
twitter: magthe   http://therning.org/magnus

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 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: PGP signature