From: wuzhouhui <wuzhouhui14@mails.ucas.ac.cn>
To: git@vger.kernel.org
Cc: cuifang@sugon.com
Subject: How to find the commit that erase a change
Date: Wed, 9 Oct 2019 10:28:40 +0800 (GMT+08:00) [thread overview]
Message-ID: <5e12e2d8.1ed16.16dae58d6ac.Coremail.wuzhouhui14@mails.ucas.ac.cn> (raw)
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.
next reply other threads:[~2019-10-09 2:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-09 2:28 wuzhouhui [this message]
2019-10-09 3:02 ` How to find the commit that erase a change Junio C Hamano
2019-10-09 3:51 ` wuzhouhui
2019-10-09 13:21 ` Derrick Stolee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5e12e2d8.1ed16.16dae58d6ac.Coremail.wuzhouhui14@mails.ucas.ac.cn \
--to=wuzhouhui14@mails.ucas.ac.cn \
--cc=cuifang@sugon.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).