How do you make sure that you always have a releasable build? <p>How do you make sure that you always have a releasable build?</p> <p>I'm on a Scrum team that is running into the following problem: At the end of the Sprint, the team presents its finished user stories to the Product Owner. The PO will typically accept several user stories but reject one or two. At this point, the team no longer has a releasable build because the build consists of both the releasable stories and the unreleasable stories and there is no simple way to tear out the unreleasable stories. In addition, we do not want to just delete the code associated with the unreleasable stories because typically we just need to add a few bug fixes.</p> <p>How should we solve this problem? My guess is that there is some way to branch the build in such a way that either (a) each user story is on its own branch and the user story branches can be merged or (b) there is a way of annotating the code associated with each user story and creating a build that only has the working user story. But I don't know how to do either (a) or (b). I'm also open to the possibility that there are much easier solutions.</p> <p>I want to stress that the problem is not that the build is broken. The build is not broken -- there are just some user stories in the build that cannot be released.</p> <p>We are currently using svn but are willing to switch to another source control system if this would solve the problem.</p> <p>In addition to answers, I'm also interested in any books or references which address this question.</p>