This pattern can be supported by a continuous integration (CI) server.
The CI server merges the local changes with the head of the master branch and performs the validations (build and tests) that make up the gate.
A commit to the central location will only be allowed if the gates are cleared.
As an alternative this pattern can be realized using different branches in version control.
For instance, GitHub can force all commits to a branch B to be merge commits from pull requests which have successfully been built on the CI server and are up-to-date (i.e. based or rebased on B).