Is there any way to config Git to reject a merge if the action will result in a detached HEAD?
I know how to solve the detached HEAD, but I would rather have git to reject the merge-action to avoid the detached HEAD entirely.
The issue occurs when this happens:
- I am working on a developbranch in the main repo and I also comitted some changes in a submodule repository. Thedevelopbranch is updated to match the newest commit of the submodule.
- A colleague wants to merge developinto themaster, but forgets to pull the submodule onmasterfirst. This results in a detached HEAD.
 
     
    