Re: last commit in a directory
- From
Johannes Sixt <j.sixt@viscovery.net>
- Date
- Jan 25, 2011, 08:47 UTC
- Message-ID
- <4D3E8E0B.2090200@viscovery.net>
- In-Reply-To
- <4D3E89FA.4080901@gmail.com>
Am 1/25/2011 9:29, schrieb Leonid Podolny:
> I have a really simple question: how do I find a last commit for the given > directory inside the repository?
git log -1 that/directory
But if you need it in a script, this is preferable:
lastsha1=$(git rev-list -1 HEAD -- "$directory")
-- Hannes