【问题标题】:git grep: Where is "binary file" in match?git grep:匹配中的“二进制文件”在哪里?
【发布时间】:2021-05-18 05:37:30
【问题描述】:

我正在寻找可能已在 Git 存储库中提交的内容。我正在使用如下命令:

git grep ABCD `git rev-list --all`

并获得类似的输出

Binary file 9246a896bf37856f37d424dbcb40d14a51b6b315:blah-blah-blah-ABCD-blah-blah matches
Binary file 083407e0ea97796054f614c28808ae9a4fcf2fe8:blah-blah-blah-ABCD-blah-blah matches

如何找到与此相关的一个或多个提交?

【问题讨论】:

    标签: git git-grep


    【解决方案1】:

    它就在你面前:9246a896bf37856f37d424dbcb40d14a51b6b315 是提交,blah-blah-blah-ABCD-blah-blah 是文件名。

    【讨论】:

    • 谢谢。我使用git log --branches=* 查找了那个十六进制字符串,但没有找到,所以假设它一定不是提交ID。但是git log -r 9246a896bf37856f37d424dbcb40d14a51b6b315 显示了我想要的。
    猜你喜欢
    • 1970-01-01
    • 2022-01-08
    • 1970-01-01
    • 1970-01-01
    • 2014-11-09
    • 2014-06-24
    • 1970-01-01
    • 2018-01-23
    • 1970-01-01
    相关资源
    最近更新 更多