I am trying to use GIT hooks to restrict commit message formats (e.g. "must start with #") on my main branches only: dev, master. I do want to allow contributors to have their own custom commit messages on their private branches.
Example: If someone has X commits on their private branch "commit1"...."commitX", can I use hooks to block them from merging to or into dev/master branches telling them that only commits starting with "#" are allowed?