git:列出包含指定文本的文件(git:listing files that ever contained specified text)

编程入门 行业动态 更新时间:2024-10-24 16:33:20
git:列出包含指定文本的文件(git:listing files that ever contained specified text)

我需要列出当前或历史中某个时刻包含指定文本的所有文件。无论如何都要这样做吗?

I need to list all the files that currently or at some point in history contained a specified text.Is there anyway to do that?

最满意答案

你可以做到:

git grep 'the specified text' $(git rev-list --all)

You could do with:

git grep 'the specified text' $(git rev-list --all)

更多推荐

本文发布于:2023-07-16 15:43:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1130490.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文本   文件   git   listing   text

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!