1.找到svn的所在目录:
我的目录在/usr/local/svn/myproject
2.新建post-commit
vim hooks/post-commit
#!/bin/sh
export LANG=zh_CN.UTF-8
SVN=/usr/bin/svn
WEB=/home/wwwroot/myproject
$SVN update $WEB --username xxx --password xxx
3.保存并退出
4.重启svn服务
svnserve -d -r /usr/local/svn/myproject