last commit in a directory
Hi,
I have a really simple question: how do I find a last commit for the given directory inside the repository? I want to avoid rebuilding the specific part of the project if there were no changes in it since the last build, so I need to find the sha of the last time the directory was changed.
Thanks, L.
Am 1/25/2011 9:29, schrieb Leonid Podolny:
Quoted 2 lines
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
Quoted 10 lines · Johannes Sixt
Am 1/25/2011 9:29, schrieb Leonid Podolny:
Quoted 2 lines
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")
Thanks!