gpt4 book ai didi

git - 在所有分支的一个文件中搜索字符串

转载 作者:行者123 更新时间:2023-12-04 12:46:44 26 4
gpt4 key购买 nike

是否可以使用 Git grep 中的字符串一个文件所有分行 ?

我知道我对特定文件进行了更改;我只是找不到我在哪个分支上做的。

最佳答案

感谢 ElpieKay 提供这个漂亮的小 gem :

git grep a_string $(git rev-parse --all -- target_file)

关于git - 在所有分支的一个文件中搜索字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37213784/

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