# Uncommitted source and header files disappeared after a git mv operation

6 messages from 2010-06-23 to 2010-06-23. Participants: Laszlo Papp, Santi Béjar, Mahesh Vaidya, Matthieu Moy.
Thread: https://gitlist.dev/t/24171

## Laszlo Papp, 2010-06-23 10:24

Subject: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <AANLkTiloMDccUDObmPXPGWI_HYVDMk57EoHxZjFUiSvi@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTiloMDccUDObmPXPGWI_HYVDMk57EoHxZjFUiSvi%40mail.gmail.com
In-Reply-To: <AANLkTikeW1-Kzdyu1APSqzKGsNnny6InueWluXsKMccU@mail.gmail.com>

```
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, 2010-06-23 10:31

Subject: Re: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <AANLkTilNI0lq0rUqvUIdNRpubNUNqKf3_5nX3TGauvQv@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTilNI0lq0rUqvUIdNRpubNUNqKf3_5nX3TGauvQv%40mail.gmail.com
In-Reply-To: <AANLkTiloMDccUDObmPXPGWI_HYVDMk57EoHxZjFUiSvi@mail.gmail.com>

```
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

```

## Laszlo Papp, 2010-06-23 10:34

Subject: Re: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <AANLkTinernf5BMowVb-iJZi0c9d6SlsGSoy2L3p4H-3E@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTinernf5BMowVb-iJZi0c9d6SlsGSoy2L3p4H-3E%40mail.gmail.com
In-Reply-To: <AANLkTilNI0lq0rUqvUIdNRpubNUNqKf3_5nX3TGauvQv@mail.gmail.com>

```
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

```

## Mahesh Vaidya, 2010-06-23 10:47

Subject: Re: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <AANLkTimi_kN_i2XmKiCB4JdqGD4_kFSjIbajtvpBWnwE@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTimi_kN_i2XmKiCB4JdqGD4_kFSjIbajtvpBWnwE%40mail.gmail.com
In-Reply-To: <AANLkTinernf5BMowVb-iJZi0c9d6SlsGSoy2L3p4H-3E@mail.gmail.com>

```
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:
> 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, 2010-06-23 10:50

Subject: Re: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <AANLkTim8TblD_TUpmGR2vCjQnXMfK4WAFA3dh39dloAs@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTim8TblD_TUpmGR2vCjQnXMfK4WAFA3dh39dloAs%40mail.gmail.com
In-Reply-To: <AANLkTilNI0lq0rUqvUIdNRpubNUNqKf3_5nX3TGauvQv@mail.gmail.com>

```
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, 2010-06-23 11:23

Subject: Re: Uncommitted source and header files disappeared after a git mv operation
Message-ID: <vpqwrtqf0w8.fsf@bauges.imag.fr>
URL: https://gitlist.dev/e/vpqwrtqf0w8.fsf%40bauges.imag.fr
In-Reply-To: <AANLkTim8TblD_TUpmGR2vCjQnXMfK4WAFA3dh39dloAs@mail.gmail.com>

```
Laszlo Papp <djszapi@archlinux.us> writes:

> 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/

```
