git commit history lost?

2019-09-06 13:33发布

问题:

I encountered the following problem:

    $ git show 0fb108b
    commit 0fb108b3e564f92e60a14d4da6ab1df32e67a35f
    Author: user1 <user1@example.com>
    Date:   Thu Apr 16 10:08:01 2015 +0800

        update commiit

    diff --git a/file1.jsp
    index a6183b1..b07cd04 100644
    ...
    ...

But when I submitted the query history of this file, and didn't see the above submit history:

    $ git log -- file1.jsp
    ...
    ...

gitlab version: gitlab-7.7.2_omnibus.5.4.2.ci x86_64 git version: git version 1.9.5.msysgit.0 OR Eclipse subgit-2.0.3 OS version: CentOS 7.0 64bit

How to solve this problem? Thanks!

回答1:

The simple way to do it is this:

git log --follow -p -- file1.jsp


标签: git gitlab