I'm not a git expert, but I'm pretty sure it has hooks that run at the end of pull requests and when changing branches. I used similar functionality in mercurial at Viewfinder in order to create Xcode project files using gyp.