Git Git 更改查询,一个很难的 Git 任务,没思路了

lips · March 31, 2015 · Last by huhongda replied at April 02, 2015 · 6769 hits

想在最近 1 个月的所有提交中,输出更改内容中包含 xxx 关键字的相关文件列表, 如何做到?

你要文件列表对吧?那么 -p 是非必要的,可以这样:

git log -G[search_pattern] --since=1.month --name-only --format=

format 我留空了,你可以自己去查 git log 文档去定义输出的格式,比如说 --format=%H 可以把对应的 commit hash 输出来。另外可以用 --name-status 替代 --name-only,这样可以看出改动的类型。

SourceTree

安装个 tig

You need to Sign in before reply, if you don't have an account, please Sign up first.