我正在寻找2个git提交之间的提交信息,我使用了以下命令
$ git log --pretty=format:"%cn committed %h on %cd description %B files" --name-only 8ce980e ^99214db
,输出低于
DevTools App User committed 8ce980e on Mon Jun 6 09:09:28 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.102
files
.properties/release.properties
DevTools App User committed 179a8d9 on Mon Jun 6 08:12:40 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.101
files
.properties/release.properties
DevTools App User committed 2dc3410 on Mon Jun 6 07:48:21 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.100
files
.properties/release.properties
DevTools App User committed 49b34c7 on Mon Jun 6 06:23:30 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.99
files
.properties/release.properties
DevTools App User committed 5594e34 on Mon Jun 6 03:17:10 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.98
files
.properties/release.properties
DevTools App User committed 92915c9 on Fri Jun 3 11:16:04 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.93
files
.properties/release.properties
DevTools App User committed 17278e2 on Fri Jun 3 10:55:03 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.91
files
.properties/release.properties
DevTools App User committed c165306 on Thu Jun 2 14:43:33 2016 -0400 description Released Build version ${env.MAJOR_VERSION}.${env.MINOR_VERSION}.88
files
.properties/release.properties
问题是 - 除了提交ID 99214db之外,还显示提交ID 99214db之前,即 c165306 。我还希望显示提交ID 99214db及其相关的详细信息。
请在我错的地方帮助我。谢谢。
答案 0 :(得分:1)
^99214db
表示--not
(git log
):它排除了可从99214db
(包括99214db
本身)到达的提交
在99214db
和8ce980e
:
git log 8ce980e...99214db~
(参见" What are the differences between double-dot "..
" and triple-dot "...
" in Git diff commit ranges?")