I checked out 'production_branch' then did a merge of 'master_branch for_production_branch' there were massive conflicts. 'production_branch' has been deployed to production. But the conflicts require a more experienced eye. I need to get a critical patch (I will do it by hand) onto the production branch 'production_branch' so I can deploy.
git co 'production_branch' # =>
lib/tasks/foobar.rake: needs merge
vendor/plugins/acts_as_syncable/lib/active_record/whatever.rb: needs merge
error: you need to resolve your current index first
and
git co 'master_branch for_production_branch'
lib/tasks/foobar.rake: needs merge
vendor/plugins/acts_as_syncable/lib/active_record/whatever.rb: needs merge
error: you need to resolve your current index first
How can I get back to 'production_branch' in my working directory so I can deploy a simple critical fix.
You can use
git merge --abort
to abort your current merge action and revert to the situation before your started the merge. See git merge documentation for more details.
Note that it will throw away any changes your made, but I suppose this is not a problem in your current situation...