How to do emergency fixes on master in git?

I have committed some changes (r5,6,7,8) to master and pushed to origin. Other people have pulled. Now master is supposed to be deployed in 2 days, but there is an emergency and something needs to go out today. What's the best practice for this? Do I create a new branch off of r4 and deploy that branch and then merge this branch into master? Someone on IRC said to temporarily revert them, commit, then unrevert them, but am trying to grasp how this would be better or how this works.

Answers


Someone on IRC said to temporarily revert them, commit, then unrevert them, but am trying to grasp how this would be better or how this works.

This would create an extremely ugly history: Instead of r4-r5-r6-r7-r8-fix your history would look like r4-r5-r6-r7-r8-x8-x7-x6-x5-fix-r5-r6-r7-r8 after all the changes.

Creating a branch off "r4" is the best solution. You should have a production branch anyway that is not updated unless something is deployed to production...


Need Your Help

How to implement multiple filters with checkboxes in emberjs?

javascript ember.js checkbox ember-cli

How do I implement multiple filters with checkboxes in emberjs? I would like to filter a grid table with the items that have certain properties that are checked in the template checkboxes...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.