We have several teams which are working on multiple branches, I want to allow them only to merge from master and develop and not from each other, because we had an issue in which someone merge another team's branch and pushed to master (that was a hell of a weekend)
So naturally I've try to play with the Pre-Merge-Commit hook, but it seems to have its own problem and I can't be sure what is the branch to merge from (correct me if I'm wrong)
What is the best way to keep it simple and allow them to only merge from the branches I choose?
Thanks :)