所有分支(甚至远程分支)范围的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