Assume that there are two branches A and B in the git library. How to set it to achieve the following effect: Allow B merge into A, and vice versa
vi .git/hooks/prepare-commit-msg
#!/bin/sh case "," in merge,) grep "'A'" ; if [ $? ];then echo '禁止合并A merge into B'; exit 1; fi;; *) ;; esac
vi .git/hooks/prepare-commit-msg