2016-10-18 16 views
1

我想找收集提交2 GIT中之間的信息提交和我用下面的命令收集git的承諾信息B/N 2款

$ 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即ie c165306正在顯示,不包括提交ID 99214db。我希望顯示提交ID 99214db及其關聯的詳細信息。

請幫我,我錯了。謝謝。

回答

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?」)

+0

:謝謝你的輸入。 我修改我的命令,按您的建議,如下 git的日誌--pretty =格式爲:「%CN致力於%H的%CD描述%B文件」 --name只99214分貝8ce980e 而不是給提交信息b/n那些範圍,它也提供額外的提交信息 – voltas

+0

@voltas是的,這就是爲什麼我發佈了關於日誌範圍的圖片。你至少看到正確的承諾嗎? – VonC

+0

如果我想限制信息b/n 8ce980e和99214db。我怎麼才能得到它 ?謝謝 – voltas