Gated commit
A gated commit or gated check-in[1] is a software build pattern that reduces the chances for breaking a build by committing trivial changes into the main branch of version control. In most cases this pattern must be supported by the continuous integration (CI) server.[2]
To perform a gated commit the software developer requests a gated commit from the CI server before committing the actual changes. The CI server merges the local changes with the head of the master branch and performs a build. So the developer can see if his or her changes break the build without actually committing the changes.
As an alternative this pattern can be realized using different branches in version control. For example, 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).[3]
References
- ^ "Set build triggers on TFS". Visual Studio. Retrieved 2016-06-18.
- ^ "Build Pattern: Gated Commit". Retrieved 2014-08-18.
- ^ "Enabling required status checks". GitHub user documentation. Retrieved 2016-06-18.