如何筛选查询所有git commit 的文件有包含某个字串?-灵析社区

练习代码二十年

不是 commit log 而是,筛选出每个 commit 的文件更新/新增/删除内容有包含 NNN 的字串的commit 举例 : 2023-11-20 commit message = "更新订单功能2" files: * A.txt `insert: update customer_order .......` 2023-11-19 commit message = "更新订单功能1" files: * A.txt `modify: insert order .......` 想要能找出有 customer_order 字串的 2023-11-20 commit

阅读量:16

点赞量:0

问AI
使用 "-G" 或者 "-S" 参数,来搜索 commit 中文件的差异部分。 git log --all -S userInfo "S" 使用普通字符串进行搜索,"G" 可以使用正则表达式。 * "Git - git-log Documentation" (https://link.segmentfault.com/?enc=osPmPPr2efTfqwPaRJ0IlQ%3D%3D.QXaGtUW5KEXx7WLKnCuufl20GSI%2F7ronidJ2rNjyLWdPIdEjdVyBiDeFK%2F1Uh7u6xMtZOO52RwKFIQ%2BtwGQazfyY8IBwYhezkjRKl36kd78%3D)