Disable possibility to merge a branch into an other branch

Is it possible to disable possibility to merge one branch into another? For example, I have a branch named develop and feature branches named A, B and C.

I want to make impossible to merge develop into A, or into B or into C:

git checkout A
git merge develop 

should return an error.

>Solution :

No, this is not possible in Git. Instead you would manually review suggested changes to your repo and reject those that you don’t like (for example, somebody dragged changes from develop to branch A).

Leave a Reply