Hacker News new | ask | show | jobs
by adjejmxbdjdn 29 days ago
Why would partial commits necessarily break anything?

In fact, often partial commits are necessary for builds.

As an example (and to be fair, this was a transitional project), I once worked on a project where the local dev directly acquired packages from different parts of the application, but the actual CI was broken up into different pipelines which required some parts to be built first, its outputs packaged and added to the registry, and downstream parts to be built after.

Committing everything at once would literally break the CI.

1 comments

If the dev's working tree isn't exactly what they checked in, how do they build or test the commit? Do they YOLO a partial commit and wait for it to be accepted or rejected by the CI? Isn't that a problem to be solved by improving the CI pipeline?