I have created a custom git pre-receive hook as per steps mentioned here
https://docs.gitlab.com/ee/administration/custom_hooks.html
Its a shell script which does some analysis of the commits and rejects them if there are any issues. However it can have lot of positives and developers should not find it a nuisance. So is there a way that they can force push even if the pre-receive hook fails ? I tried
git push --force
but it is still rejected.