How to hide my attempt to resolve git conflicts

I checked 'production_branch', then merged "master_branch for_production_branch", there were massive conflicts. "production_branch" has been deployed to production. But conflicts require a more experienced look. I need to get a critical patch (I will do it manually) on the production branch 'production_branch' so that 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 go back to 'production_branch' in my working directory so that I can deploy a simple critical solution.

+5
source share
2 answers

you can use

git merge --abort

. . git .

, , , ...

+18

git reset --hard commitsha

commitsha - sha git. gitk git log, commit_sha

git reset --hard production_branch

+9

All Articles