Reject Merge Commits
Enforces a linear workflow policy. This means that any unnecessary merge commits will be rejected. This forces your users to use rebase rather than merge to keep a linear history. This does not affect pull requests, so branches can still be merged, however, the trivial merge commits will be avoided. You can set up your own custom message to appear as the push is rejected.
The hook will list the commit ids that were rejected so that the user knows the commits that are causing the push to be blocked.
This will NOT affect any existing merges, if a merge is already committed and pushed, the hook will not look at that commit, only at new ones.