I'm trying to get into the habit of making sure that each master
commit to a repository I work on does not break any existent tests. In my current flawed workflow, there are some intermediate commits on master
that do not pass all tests, and I'm trying to adopt a solution to this.
From About Continuous Integration
Building and testing your code requires a server. You can build and test updates locally before pushing code to a repository, or you can use a CI server that checks for new code commits in a repository.
What I've been unable to figure out is whether continuous integration is built on git hooks, an exclusive alternative to git hooks, or a complementary solution.
What is the relationship between Continuous Integration and git hooks?
I've seen the question CI platforms versus simple git hooks but I understand the answer to be posing them as alternatives, where git hooks are practical for solo/smaller projects, and CI is able to scale more appropriately with larger projects. At the same time, I see articles like 3 Git hooks for continuous integration, which makes the relationship seem more than them just being alternatives.
Bringing up CI's different relationship with server-side vs. local git hooks specifically would help clear things up too.