How to find the commit that erase a change

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a file which contains complicated change history. When I use
    git log -p file
to see all changes made in this file, I found that a change disappeared
for no reason.

For example, I made following change in a commit:

@@ -2,3 +2,8 @@ int main(void)
 {
        printf("hello world");
 }
+
+func(void)
+{
+       printf("a func");
+}

But when I open this file of latest version, I found the above change is
disappeared. So I decide use
    git log -p file
to see which commit erase my change. But I doesn't see any commit which
contains changes like following:

@@ -2,8 +2,3 @@ int main(void)
 {
        printf("hello world");
 }
-
-func(void)
-{
-       printf("a func");
-}

So, how to find the commit that erase my change?

Thanks. Please use Reply-All when reply this email.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux