2016-08-09 55 views
0

我希望單個提交的git log但沒有差異。如何獲取單個提交的日誌而無差異

到目前爲止,這是最簡單的解決方案:

git log -1 <commit> 

它看起來像我想的-<number>開關。從手冊頁:

-<number>, -n <number>, --max-count=<number> 
    Limit the number of commits to output. 

這不是上述問題中的任何一個的確切副本。

+0

你鏈接的問題的第二個答案你自己應該幫助你找出如何得到任何結果... – poke

+0

我原來的問題措辭不佳。就像現在一樣,這個問題不是重複的。 –

回答

0

你嘗試:

git log -n 1 --pretty=%B <treeish> 
+0

對不起,我的問題措辭不佳。我也想要提交,作者和日期。 –

+0

在https://git-scm.com/docs/git-log查看「PRETTY FORMATS」 – DavidN

0

你可以試試,

git log -n 1 --pretty=format:'%h %ad %s (%an)' 

OR

git log -n 1 --pretty=format:"%h%x09%an%x09%ad%x09%s"