Gated commit


A gated commit, 'gated check-in or pre-tested commit'
is a software integration pattern that reduces the chances for breaking a build by committing changes into the main branch of version control. This pattern can be supported by a continuous integration server.
To perform a gated commit the software developer must request a gated commit from the CI server before committing the actual changes to a central location.
The CI server merges the local changes with the head of the master branch and performs the validations that make up the gate. So the developer can see if their changes break the build without actually committing the changes. 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.