3 ms·
With modern technologies this is definitely a no-no. With DVCS you can create your own branch and push it to other systems super easily, so there's little excu
by InclinedPlane 16y ago
With modern technologies this is definitely a no-no.
With DVCS you can create your own branch and push it to other systems super easily, so there's little excuse for checking in broken code to a shared branch. Also, with a lot of newer VCSes there's often a feature to "shelve" a changeset to a central DB without committing it.
Not to mention that breaking the build for more than a few minutes raises some serious red flags about the way you're working.
- ekidd 16y agoI agree that breaking the build is normally a very bad idea. I've gone after friends with Nerf weapons for doing this. :-) But there are a few cases where it's a necessary evil. For example, when upgrading a large Rails application from Rails 2.3 to 3.0, you're likely to make hundreds of small changes before everything works again. In this case, I create a new branch, prepend "BROKEN:" to each commit message, and record the number of unit tests that are currently passing. Once all the tests are fixed, I hand-test, add new tests for any regressions that weren't caught by the automatic tests, and merge back to the main development branch.
- tuxychandru 16y agoWhy not squash all the broken commits together before pushing to the central repository (assuming you use a DVCS)?
- josegonzalez 16y agoBecause rewriting history is a no-no.
- jimktrains2 16y ago:: raises hand :: Only if no one else ever saw that part of history, right? :: shaky eyes ::