git commit history lost?

こ雲淡風輕ζ 提交于 2019-12-12 01:28:26

问题


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


来源:https://stackoverflow.com/questions/29725496/git-commit-history-lost

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!