I want a file in my repository to be automatically updated (with any value, I just want its timestamp to be changed) with every git commit. How can I do this?
My reason is to force my Glassfish appserver to reload my webapp when I build it on the server. I need to touch a file called .reload for this to happen. Rather than doing so manually, I want git pull origin; mvn build on my server to also touch the .reload file.
git-hooks, thanks to the commenters on my question above, seems to be the way to go. maven cargo, thanks to the other answer, is a good way too; in fact, perhaps better for deployment, but if you want to do something more general git-hooks is better.