Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
所有分支(甚至远程分支)范围的Git日志_Git_Git Log - Fatal编程技术网

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

所有分支(甚至远程分支)范围的Git日志,git,git-log,Git,Git Log,我正在尝试以下方法 git log --before {2.days.ago} --after {14.days.ago} --all --stat 但它似乎只给我一个远程分支的日志。我想获取远程和本地分支的日志 git log --before {2.days.ago} --after {14.days.ago} --all --stat --branches=* --remotes=* 您能解释--all,-branchs=*和--remotes=*做什么,以及--all是否冗余吗 --

我正在尝试以下方法

git log --before {2.days.ago} --after {14.days.ago} --all --stat
但它似乎只给我一个远程分支的日志。我想获取远程和本地分支的日志

git log --before {2.days.ago} --after {14.days.ago} --all --stat --branches=* --remotes=*
您能解释--all,-branchs=*和--remotes=*做什么,以及--all是否冗余吗

--all
,如或中所述,-all包括
--branchs
--remotes

--all
显示在refs/中找到的所有REF

分别显示所有分支、标记或远程跟踪分支(即分别在
refs/heads
refs/tags
refs/remotes
中找到的refs)

如果给定模式,则只显示与给定外壳全局匹配的参考。
如果模式不包含全局字符(
*
[
),则通过追加
/*
将其转换为前缀匹配

如图所示:

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

git log --before {2.days.ago} --after {14.days.ago} --stat --branches --remotes

谢谢。--branchs=*似乎是包含所有“不符合要求”的分支的唯一方法你能解释一下
--all
--branchs=*
--remotes=*
是做什么的,以及
--all
是否是多余的吗?我看了一下,但有点难读,没有给出“示例”第节如何执行提交列表,其中包括来自本地和远程的所有提交,或者甚至是使用
--all
的单个示例。不完全确定它的作用,因为我只是基于原始询问者的问题,但从我收集的信息来看,它与可能“丢失”的提交有关由于
git reset HEAD~1
之类的原因,提交只在reflog中,实际上不再在分支上。
test_expect_success 'rev-parse --exclude with --all' '
    compare rev-parse "--exclude=refs/remotes/* --all" "--branches --tags"
'
git log --before {2.days.ago} --after {14.days.ago} --stat --branches --remotes