The goal of a Pre-receive (push) Hook is to validate validates all incoming commits as they first appear in a repository. So, if If changes are validated once, and they won’t be are not checked by the pre-receive hook again.
A Merge Checkvalidates all commits included into Pull Request in a pull request (YACC does this even if they were checked already). This allows to postpone postponing validation until PR the pull request merge, rather than at the time the changes are pushed. If you haven’t enabled push-have not enabled Pre-receive (push) hook, incoming changes will are not be validated during a push.
Note, that Pull Request merge may can create new commits with new hashes , which haven’t have not been validated yet, so a Pre-receive (push-) hook should step in here and validate them on merge. This may happen in cases like theseFor example:
merge
...
commit for
...
the pull
...
request
...
. This can be excluded by enabling the Exclude Merge Commits option.
merge strategies like history-modifying commits
...
created with rebase or squash merge strategies. Recommendation:
...
avoid using these merge strategies.
...
Contact Support if you encounter any issues.
commits introduced by fork / sync / resolve-conflicts / upmerge workflows
You can use Pre-receive (push) Hook and Merge Check independently , with a separate settings. Or , or you may can enable them both together, to combine validation of some rules as they are committed and postponing postpone some checks until a Pull Request merge.