threads / discuss / 24171

Uncommitted source and header files disappeared after a git mv operation

Subject: Uncommitted source and header files disappeared after a git mv operation

## tl;dr

6 messages between Jun 23, 2010 and Jun 23, 2010.

replies: 5people: 4as markdown or json

Laszlo Papp· Jun 23, 2010, 10:24 UTC · lore
Hello,
I have got a very big trouble, so please help me if you can :(

I have done a git mv operation for a whole directory, so I have put it into another subfolder and all my uncommitted/unpushed source and header files were lost ... How can I regain them ?

So I did "git mv some-directory-containing-lots-of-uncommitted-changes total_different_folder/some-new-name". If I remember well then I did commit/push for that git mv operation.

git status doesn't show my changes either. Do I have any chance to avoid so that my boss fires me ?

Best Regards, Laszlo Papp

Santi Béjar· Jun 23, 2010, 10:31 UTC · re: Laszlo Papp · lore

Re: Uncommitted source and header files disappeared after a git mv operation

On Wed, Jun 23, 2010 at 12:24 PM, Laszlo Papp <djszapi@archlinux.us> wrote:
Show 13 quoted lines
> Hello,
>
> I have got a very big trouble, so please help me if you can :(
>
> I have done a git mv operation for a whole directory, so I have put it
> into another subfolder and all my uncommitted/unpushed source and
> header files were lost ... How can I regain them ?
>
> So I did "git mv some-directory-containing-lots-of-uncommitted-changes
> total_different_folder/some-new-name". If I remember well then I did
> commit/push for that git mv operation.
>
> git status doesn't show my changes either.

I can't reproduce it. Can you provide a test case so we can reproduce it. Additionally you should tell us more information, like git version, architecture.

Santi
Laszlo Papp· Jun 23, 2010, 10:34 UTC · re: Santi Béjar · lore

Re: Uncommitted source and header files disappeared after a git mv operation

On Wed, Jun 23, 2010 at 12:31 PM, Santi Béjar <santi@agolina.net> wrote:
Show 21 quoted lines
> On Wed, Jun 23, 2010 at 12:24 PM, Laszlo Papp <djszapi@archlinux.us> wrote:
>> Hello,
>>
>> I have got a very big trouble, so please help me if you can :(
>>
>> I have done a git mv operation for a whole directory, so I have put it
>> into another subfolder and all my uncommitted/unpushed source and
>> header files were lost ... How can I regain them ?
>>
>> So I did "git mv some-directory-containing-lots-of-uncommitted-changes
>> total_different_folder/some-new-name". If I remember well then I did
>> commit/push for that git mv operation.
>>
>> git status doesn't show my changes either.
>
> I can't reproduce it. Can you provide a test case so we can reproduce
> it. Additionally you should tell us more information, like git
> version, architecture.
>
> Santi
>
http://www.archlinux.org/packages/extra/i686/git/
So the version is 1.7.1 and the architecture is i686.

I have tried the following commands: git log -1 git log -1 --stat git reflog

Only this commit happened and I can't find the files in the new directory.

Best Regards, Laszlo Papp

Mahesh Vaidya· Jun 23, 2010, 10:47 UTC · re: Laszlo Papp · lore

Re: Uncommitted source and header files disappeared after a git mv operation

That means those files were not added to index ; Even that private files should stay intact

I have done following test case PWD - lowflow touch foo bar car cd .. git mv lowflow workflow git commit -m "mv test" -a git push cd workflow # Uncommited files visible

On Wed, Jun 23, 2010 at 4:04 PM, Laszlo Papp <djszapi@archlinux.us> wrote:
Show 41 quoted lines
> On Wed, Jun 23, 2010 at 12:31 PM, Santi Béjar <santi@agolina.net> wrote:
>> On Wed, Jun 23, 2010 at 12:24 PM, Laszlo Papp <djszapi@archlinux.us> wrote:
>>> Hello,
>>>
>>> I have got a very big trouble, so please help me if you can :(
>>>
>>> I have done a git mv operation for a whole directory, so I have put it
>>> into another subfolder and all my uncommitted/unpushed source and
>>> header files were lost ... How can I regain them ?
>>>
>>> So I did "git mv some-directory-containing-lots-of-uncommitted-changes
>>> total_different_folder/some-new-name". If I remember well then I did
>>> commit/push for that git mv operation.
>>>
>>> git status doesn't show my changes either.
>>
>> I can't reproduce it. Can you provide a test case so we can reproduce
>> it. Additionally you should tell us more information, like git
>> version, architecture.
>>
>> Santi
>>
>
> http://www.archlinux.org/packages/extra/i686/git/
>
> So the version is 1.7.1 and the architecture is i686.
>
> I have tried the following commands:
> git log -1
> git log -1 --stat
> git reflog
>
> Only this commit happened and I can't find the files in the new directory.
>
> Best Regards,
> Laszlo Papp
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
-- 
Thank you and best regards.
Mahesh Vaidya  / 9740500144
http://www.twitter.com/forvaidya
Laszlo Papp· Jun 23, 2010, 10:50 UTC · re: Santi Béjar · lore

Re: Uncommitted source and header files disappeared after a git mv operation

I had some news.

I have just checked the bash history on linux, which doesn't contain any intereting, but I have just realised the situation now, so the following happened:

1) So the uncommitted files were on windows
2) I renamed the whole directory under linux.
3) I pushed the changes under linux
4) At last I did a git pull under windows.
The files disappeared on windows and they weren't committed :(
I use this versions on windows:
MySYSGIT: http://code.google.com/p/msysgit/downloads/detail?name=msysGit-fullinstall-1.7.1-preview20100612.exe&can=2&q=
TortoiseGIT:
http://code.google.com/p/tortoisegit/downloads/detail?name=TortoiseGit-1.5.2.0-32bit.msi&can=2&q=

Best Regards, Laszlo Papp

Matthieu Moy· Jun 23, 2010, 11:23 UTC · re: Laszlo Papp · lore

Re: Uncommitted source and header files disappeared after a git mv operation

Laszlo Papp <djszapi@archlinux.us> writes:
Show 10 quoted lines
> I had some news.
>
> I have just checked the bash history on linux, which doesn't contain
> any intereting, but I have just realised the situation now, so the
> following happened:
>
> 1) So the uncommitted files were on windows
> 2) I renamed the whole directory under linux.
> 3) I pushed the changes under linux
> 4) At last I did a git pull under windows.

Are you sure the files are not where they used to be (i.e. under the directory name used before renaming)?

Git usually takes great care not to touch untracked files. I'd be very surprised if it did for you.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

← back to recent threads