在远程仓库的hooks中添加Update文件如下:
#!/bin/sh
if [ $USER != "git-repo-admin" ];
then
if [ "$1" == refs/heads/master ];
then
echo "Manual pushing to this repo is restricted"
exit 1
fi
fi
这样,只有git-reop-admin才可以push到master。
还没有测试是否可行。。。
在远程仓库的hooks中添加Update文件如下:
#!/bin/sh
if [ $USER != "git-repo-admin" ];
then
if [ "$1" == refs/heads/master ];
then
echo "Manual pushing to this repo is restricted"
exit 1
fi
fi
这样,只有git-reop-admin才可以push到master。
还没有测试是否可行。。。