在 git 历史记录中搜索合并提交中的更改
要搜索已在 git 历史记录中添加/删除的字符串,我可以执行
git log -S'some text'
此操作,效果很好,只是它不搜索合并提交。如何获取在搜索中包含合并提交的命令?
To search for a string that has been added/removed in git history I can do
git log -S'some text'
This works great except that it doesn't search through merge commits. How do I get the command to include merge commits in the search?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来 -m 标志给了我想要的结果,
我在另一个网站上找到了这个,如果有人能指出我包含此标志的手册页的方向,那就太好了。这个不包含它 http://ftp。 kernel.org/pub/software/scm/git/docs/git-log.html
it appears that the -m flag gives me the desired result
I found this on another site, if someone could point me in the direction of a man page that includes this flag that would be great. This one doesn't include it http://ftp.kernel.org/pub/software/scm/git/docs/git-log.html
由于某些 Git 命令是构建在其他(“管道”)命令之上的,因此它们通常会继承其他命令的选项。我同意,看不到手册页或
--help
输出中记录的内容是很烦人的。在这种情况下,git-log 帮助状态:在这种情况下,您将在 git-diff-tree:
Since some Git commands are built on top of other ("plumbing") commands they often inherit options from other commands. I agree that it's annoying not to see those documented in the man pages or in the
--help
output. In this case, the git-log help states:In this case, you'll find the
-m
option under git-diff-tree: