Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Latest commit hash of subdirectory

Tags:

git

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?

like image 391
Andrei Avatar asked Oct 21 '25 05:10

Andrei


1 Answers

git log -n 1 --format="%h %aN %s %ad" -- $directory
like image 99
Fred Foo Avatar answered Oct 22 '25 19:10

Fred Foo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!