My example repository is this one with its last commit (K + 1) and I want to automatically insert the previous one's ( K ) commit ID ( The hash at the end of the URL) inside a source file in the repo when I commit (K + 1) ( Let's say test.c ). How can I make it, so this commit ID gets inserted in to the source like a string. So far I Google-ed and found the following strings:
$Id:$
$Id$
But so far nether of those can make it ( c2928d9091e0743cb22b38d962c75f97791767a0 ) appear inside test.c
That way I can make the particular system print this hash, to identify on which machine which version do I have.