git提交历史丢失了吗? [英] git commit history lost?

查看:387
本文介绍了git提交历史丢失了吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到以下问题:

    $ 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版本:gitlab-7.7.2_omnibus.5.4.2.ci x86_64 git版本:git版本1.9.5.msysgit.0或Eclipse subgit-2.0.3 操作系统版本:CentOS 7.0 64bit

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!

推荐答案

简单的方法是:

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

这篇关于git提交历史丢失了吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆