gpt4 book ai didi

linux - git 命令显示来自 sha1 哈希的分支/功能名称

转载 作者:太空狗 更新时间:2023-10-29 11:15:23 25 4
gpt4 key购买 nike

如何从命令行上的 sha1 散列中获取分支/功能名称?

还有这是如何使用 pretty=format 语法完成的。

我看到它是用这种方法以某种方式完成的

git log --graph --full-history --all --color \  
--pretty=format:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s"

但我不知道是哪一行导致的。

最佳答案

How do I get the branch/feature name from a sha1 hash on the command line?

你可以使用...

git branch --contains <sha1>

关于linux - git 命令显示来自 sha1 哈希的分支/功能名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14206505/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com