Subject: Re: How to embed a hash, tag or branch name?

From: Mikko Rapeli <[email-masked]>
Date: Fri, 31 Jul 2009 12:52:38 +0300

On Fri, Jul 31, 2009 at 02:27:50AM -0700, Jakub Narebski wrote:
> You can embed SHA-1 of a _file contents_ (blob) using '$Id: $' keyword
> with `ident` attribute - see gitattributes manpage.

Great, thanks!

> The correct solution of embedding version number is to do it at 
> _build time_, using e.g. script similar to GIT-VERSION-GEN used by
> Git itself and by Linux kernel.  It helps if you tag your releases.

This would help, but I'm on cygwin/msysgit and compiling with a
microcontroller IDE MPLAB and PICC-18 compiler, so I really don't
want to dig deeper into build time integration at the moment.

Btw, I don't know how didn't notice that this is a FAQ:
http://git.or.cz/gitwiki/GitFaq#Doesgithavekeywordexpansion.3F

-Mikko