Reverting the commit , if build fail in jenkins or bamboo Reverting the commit , if build fail in jenkins or bamboo jenkins jenkins

Reverting the commit , if build fail in jenkins or bamboo


  1. With subversion or any other centralized version control system, this would make more sense, since every commit goes to the central server and hopefully to Jenkins. So if one of these commits failed, you could revert it. However, with Git, you'd probably push multiple commits at once. Would you want to revert all of them even if probably just one of them is bad?

  2. Expanding on Haralan's comment, branching is the way to go. I am using GitHub and the pull request plugin is a great tool for that use case. Push code to your branch as frequently as you want. If it's a long running branch, probably merge in changes from master from time to time. Once you're satisfied, create a pull request — Jenkins will display the result right on the pull request's GitHub page where you can also merge it into master.
    So no need for reverts, only merge good stuff.