所有分支(甚至远程)的范围的Git日志

bca*_*lla 16 git git-log

我正在尝试以下方面

git log --before {2.days.ago} --after {14.days.ago} --all --stat
Run Code Online (Sandbox Code Playgroud)

但它似乎只给我一个远程分支的日志.我想获取远程和本地分支的日志.

jak*_*ils 14

git log --before {2.days.ago} --after {14.days.ago} --all --stat --branches=* --remotes=*
Run Code Online (Sandbox Code Playgroud)


Von*_*onC 7

你能解释一下 --all、--branches=* 和 --remotes=* 是做什么的,以及 --all 是否是多余的?

--all,如git rev-list或 中所述git rev-parse,--all 包括--branches--remotes

--all
Run Code Online (Sandbox Code Playgroud)

显示在 refs/ 中找到的所有引用。

--branches[=pattern]
--tags[=pattern]
--remotes[=pattern]
Run Code Online (Sandbox Code Playgroud)

显示所有分支,标签,或远程跟踪分支,分别为(即裁判中发现的refs/headsrefs/tagsrefs/remotes分别)。

如果给出了模式,则仅显示与给定 shell glob 匹配的引用。
如果模式不包含通配符(?*[),则通过附加 将其转换为前缀匹配/*

参见插图t/t6018-rev-list-glob.sh#L136-L138

test_expect_success 'rev-parse --exclude with --all' '
    compare rev-parse "--exclude=refs/remotes/* --all" "--branches --tags"
'
Run Code Online (Sandbox Code Playgroud)

由于请求远程分支,这应该足够了:

git log --before {2.days.ago} --after {14.days.ago} --stat --branches --remotes
Run Code Online (Sandbox Code Playgroud)