I have a parent project that is forked to many dependent child projects. I don't want the changes in child projects to be merged back into the parent. those. I only want to allow one way merge (parent to child).
The easiest way is to grant only read permissions to the parent branch. To merge you need to register / in this case without these permissions it is impossible to merge from child to parent. However, they will still be able to merge from parent to child.
If you cannot set security permissions as William Bartholomew suggests, another approach is to write a custom registration policy. The problem is that it can be overridden (but you can get notified when this happens)