Does anybody know how to retrieve a time of specific开发者_如何学C commit in GIT? I want to use it to display in my app build.
Here:
$ git log --pretty="%h %ad %ar" -1 0805c6f9635d77ece39cd5070a86e3ae8d889d0e
0805c6f Thu Jun 16 15:22:16 2011 +0200 19 minutes ago
The -1
will limit the amount of results to one. To get just the date remove the %h
and the %ar
from the log format.
精彩评论