tags:

views:

144

answers:

1

I would like to put a placeholder into e.g. the footer.html and have it automatically replaced by the version tag set by git tag xy right after a git pull.

... something like a post pull procedure. Is there any quick way you can do this with git?

+1  A: 

You can use git hooks to achieve this. There is no pull hook, but pull actually does fetch and merge, so you can set up a post-merge hook to automatically generate your footer.html file.

Read the relevant chapters on the Pro Git and Community books for more information.

spatz
Or `post-receive` (i.e. post fetch).
Jakub Narębski
AFAICS, `post-receive` runs on the *remote* end (i.e. the server) when you run `git push`. I may be wrong, but that's how I read its description.
spatz