同时将文件发布到多个服务器

时间:2014-04-28 09:46:12

标签: git deployment continuous-integration

以下是我的要求:

Make changes to a file --> Commit the change to git --> The tool should track the commit and publish the changed file from the git repo to multiple servers automatically.

是否有符合上述要求的工具?

1 个答案:

答案 0 :(得分:0)

您的问题非常模糊,但通常git在提交或推送更改时内置支持执行命令。请阅读git hooks

具体来说,您需要查看用于通知的post-update挂钩(在您通知或发布到其他“服务器”的情况下):

  

此挂钩由远程存储库上的git-receive-pack调用,这在本地存储库上执行git push时会发生。在更新所有引用后,它将在远程存储库上执行一次。   它需要可变数量的参数,每个参数都是实际更新的ref的名称。   这个钩子主要用于通知......

相关问题