git push review脚本实现

来源:互联网 发布:unity3d房子模型 编辑:程序博客网 时间:2024/05/16 13:57
#!/bin/sh


#check the git config file

if grep -q '"review"' .git/config;
then
    echo "recovery git config file......"
    cp .git/.config-bk .git/config
else
    cp .git/config .git/.config-bk

fi

#modify the git config file,add review
echo "[remote \"review\"]
    push = HEAD:refs/for/master" >> .git/config
grep "url = " .git/.config-bk >> .git/config


echo Config Done!

原创粉丝点击