收集git commit信息b / n 2提交

时间:2016-10-18 06:50:09

标签: git

我正在寻找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及其相关的详细信息。

请在我错的地方帮助我。谢谢。

1 个答案:

答案 0 :(得分:1)

^99214db表示--notgit log):它排除了可从99214db(包括99214db本身)到达的提交

99214db8ce980e

之间列出所有内容会更容易

http://mythic-beasts.com/~mark/git-log-for-upload-smaller.png

git log 8ce980e...99214db~

(参见" What are the differences between double-dot ".." and triple-dot "..." in Git diff commit ranges?")