Heim > Fragen und Antworten > Hauptteil
高洛峰2017-05-02 09:51:46
vi .git/hooks/prepare-commit-msg
#!/bin/sh
case "$2,$3" in
merge,)
grep "'A'" $1;
if [ $? ];then
echo '禁止合并A merge into B';
exit 1;
fi;;
*) ;;
esac