Andy
Andy

Reputation: 11008

Latest commit hash of subdirectory

I need to check latest changes in a subdirectory of a git repo. I would like to get the latest commit info in one line (sha, author, message, and may be date). Is it possible?

Upvotes: 4

Views: 2780

Answers (1)

Fred Foo
Fred Foo

Reputation: 363677

git log -n 1 --format="%h %aN %s %ad" -- $directory

Upvotes: 9

Related Questions