查询git reflog以获取对特定文件的所有提交 [英] Query git reflog for all commits to a specific file

查看:374
本文介绍了查询git reflog以获取对特定文件的所有提交的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以检查git reflog是否提交到特定文件。

Is it possible to check the git reflog for all commits to a specific file.

我提交了foo.txt文件,现在不再显示git历史通过

I made a commit to file foo.txt and now it no longer shows in the git history via

git log foo.txt

我想搜索reflog以查找对此文件的所有提交,因此我可以找到我的丢失提交。

I want to search the reflog to find all commits to this file so I can find my "lost" commit.

推荐答案

试试:

git rev-list --all -- foo.txt

这会给你一个包含foo.txt的所有提交列表。

This will give you a list of all commits containing foo.txt.

这篇关于查询git reflog以获取对特定文件的所有提交的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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