I acknowledge that the idea is amusing.
Let's be clear: anything that prevents devs from pushing to a branch will necessarily result in code being isolated on a dev's local machine. This is always a bad idea, and will always lead to lost work. I've seen it happen too many times.
Pre-commit hooks and pre-push hooks must be skipped, and eventually deleted. Every single time.