tizen.moe

tizen.moe

gerrit-cherry-pickのconflict解消

極論、"<<<.. HEAD"から">>>..."までを手で直してから

$ git add
$ git commit   (もしくは amend)

してpushしなおせということ何でしょうが。

naiki.hatenablog.com

まず status 確認して

$ git status
On branch telepathy
Your branch is up-to-date with 'hogehoge'.

You are currently rebasing.
  (fix conflicts and then run "git rebase --continue")
  (use "git rebase --skip" to skip this patch)
  (use "git rebase --abort" to check out the original branch)

Changes to be committed:
  (use "git reset HEAD <file>..." to unstage)

        modified:   magemage.c

Unmerged paths:
  (use "git reset HEAD <file>..." to unstage)
  (use "git add <file>..." to mark resolution)

        both modified:      ugeuge.c

*1

cherry-pickする前や後の状態にして、そこから手直しするというやり方もあるそうです。

$ git checkout --ours <source>

↑既存のコードに戻す

$ git checkout --theirs <source>

↑cherry-pickしたコードにする

修正するコード量によって使い分けると良い、、、のかな、、、

*1:ここでは、magemage.cは修正不要ファイル/ugeuge.cがconflictしたファイル