Re: last commit in a directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]