一、概述
通过git checkout 命令可以实现,push的时候,自动更新代码。
二、配置
在git安装目录的 hooks 文件夹下新建立 post-reive
文件,写入下面内容即可:
#!/bin/sh
git --work-tree=/data/www/ --git-dir=/data/gitroot/jizhang.git checkout -f
一、概述
通过git checkout 命令可以实现,push的时候,自动更新代码。
二、配置
在git安装目录的 hooks 文件夹下新建立 post-reive
文件,写入下面内容即可:
#!/bin/sh
git --work-tree=/data/www/ --git-dir=/data/gitroot/jizhang.git checkout -f
评论 (0)