我已經通過如何使用git log提取changeid --format =?使用:
git的日誌文件不見了--format
,但我不明白的方式來提取變化-ID(Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b如下面的例子更改-ID中)命令git log --format。
$ git log -1
commit 29a6bb1a059aef021ac39d342499191278518d1d
Author: A. U. Thor <[email protected]>
Date: Thu Aug 20 12:46:50 2009 -0700
Improve foo widget by attaching a bar.
We want a bar, because it improves the foo by providing more
wizbangery to the dowhatimeanery.
Bug: #42
Change-Id: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
Signed-off-by: A. U. Thor <[email protected]>
CC: R. E. Viewer <[email protected]>
有沒有辦法做到這一點?提前致謝!
讓我們嘗試'git log --pretty = short | grep Change-Id' – 2015-03-02 20:38:20
或'git log -1 | grep Change-Id' – 2015-03-02 20:44:04
或者如果你只想從上次提交中提取它'git log -1 | grep Change-Id' – 2015-03-02 20:44:14