假设git库中有A和B两个分支, 如何设置可以达到下面的效果:允许B merge into A, 反之则不允许
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
vi .git/hooks/prepare-commit-msg