From: wuzhouhui Date: Wed, 09 Oct 2019 02:28:40 GMT Subject: How to find the commit that erase a change Message-ID: <5e12e2d8.1ed16.16dae58d6ac.Coremail.wuzhouhui14@mails.ucas.ac.cn> 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.