gitでmarge又はpullでコンフリクトした場合の対処法をメモ

警告メッセージ「All conflicts fixed but you are still merging」

pull「git pull」はfetch、mergeを併せ持っているので
裏では同様にmarge時にコンフリクトが起きている

対処法1 [マージ元、マージ先を手動マージ]

1.マージを修正
2.コンフリクト起こしたファイルをステージング「git add .」
3.コミット「git commit」
※ 2,3をまとめて「git commit -a」

対処法2 [マージ元を採用]

「git checkout –theirs .」

対処法3 [マージ先(workディレクトリ)を採用]

「git checkout –ours .」

※「.」(ディレクトリ配下全て)ではなくファイル単位(ファイル名を指定)でも指定可

その他おすすめの備忘録

Tagged with:
 

One Response to [git]gitでmarge又はpullでコンフリクトした場合の対処法 / All conflicts fixed but you are still merging

  1. Ashizawa より:

    [git]gitでmarge又はpullでコンフリクトした場合の対処法 / All conflicts fixed but you are still merging | Memorandum blog – http://to-developer.com/blog

コメントを残す