Re: RCS keyword expansion
- From
- Lars Hjemli <hjemli@gmail.com>
- Date
- Oct 11, 2007, 19:16 UTC
- Message-ID
- <8c5c35580710111216i33ef39e4x46a9050f7f92b959@mail.gmail.com>
- In-Reply-To
- <Pine.LNX.4.64.0710111542420.23849@ds9.cixit.se>
On 10/11/07, Peter Karlsson <peter@softwolves.pp.se> wrote:
> I've looked and looked, but cannot figure out how to do RCS/CVS style > keyword expansion with Git.
If you look at 'man gitattributes' you'll find a description of the 'ident' attribute which is expanded to the SHA1 of the containing file during checkout.
There is also a description of the 'export-subst' attribute which can be used to expand keywords when generating tar/zip files with 'git-archive'. It supports commit SHA1 and date, among others.
Btw: using git-archive means that you don't need a local repository on the webserver, you only need a proper git installation. Essentially, you can update your webserver 'checkout' with something like this:
$ git archive --remote=<url> --prefix=somepath/ master | tar -x
-- larsh