Kostia Dombrovsky
Kostia Dombrovsky

Reputation: 1647

Retrieve a time of specific commit in GIT

Does anybody know how to retrieve a time of specific commit in GIT? I want to use it to display in my app build.

Upvotes: 0

Views: 72

Answers (1)

igorw
igorw

Reputation: 28259

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.

Upvotes: 6

Related Questions