'production_branch'をチェックアウトし、 'master_branch for_production_branch'のマージを実行しました。 'production_branch'は本番環境に導入されました。しかし、紛争はより経験豊富な目を必要とする。プロダクションブランチ 'production_branch'にクリティカルなパッチ(私は手作業で行う)を用意して展開する必要があります。私はシンプルな重要な修正を展開することができますので、私はgitの競合を解決しようとする試みを吹き飛ばす方法
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
と
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
は、どのように私は戻って私の作業ディレクトリの「production_branch」に得ることができます。すべての変更を吹き飛ばす。ここでcommitshaを
git reset --hard commitsha
をマージする前に設定するには
または単に 'gitの--hard HEAD'をリセット – masukomi