Automatically inject version tag into HTML file after git pull
I would like to put a placeholder in eg. footer.html and automatically replace it with the version tag set git tag xy
immediately after git pull
.
... something like a post pull procedure . Is there any quick way to do this with git?
You can use git hooks to achieve this goal . There is no hook pull
, but pull
it actually does fetch
and merge
so you can configure the hook post-merge
to automatically generate your file footer.html
.
Read the relevant Pro Git and Community chapters for more information.