Man*_*dan 20
使用git,您可以post-commit在每次提交后使用钩子进行推送.为此,您需要post-commit在.git/hooks目录中添加可执行脚本.例如
#!/bin/sh
#
# An example hook script that is called after a successful
# commit is made.
#
# To enable this hook, rename this file to "post-commit".
git push --mirror remote
Run Code Online (Sandbox Code Playgroud)
Where remote指的是您要推送的远程仓库的名称.
cron如果您愿意,您还可以设置每小时执行此脚本.
更新
Mercurial也有钩子(但当然).这是相关文档.我没有使用Mercurial,所以你必须自己解决.
| 归档时间: |
|
| 查看次数: |
10552 次 |
| 最近记录: |