From: Sverre Rabbelier Date: Sat, 16 Jan 2010 19:17:07 GMT Subject: Re: Stamp Git commit id into file during build process Message-ID: In-Reply-To: <40aa078e1001161114w5a65bebbhaf43317634899925@mail.gmail.com> Heya, On Sat, Jan 16, 2010 at 20:14, Erik Faye-Lund wrote: > I think you are looking for "git rev-parse HEAD". This outputs the > hash of HEAD as a single line on stdout. Or even better, you can use > the "git describe"-tool, which gives a nice and short description of > the commit relative to the most recent commit. It would be better to have a look at gitattributes [0] instead. [0] http://www.kernel.org/pub/software/scm/git/docs/gitattributes.html#_tt_ident_tt -- Cheers, Sverre Rabbelier