症状

CONFLICT (content): Merge conflict in ファイル名
Automatic merge failed; fix conflicts and then commit the result.

解決手順

1. コンフリクトしているファイルを確認

git status

2. ファイルを開いて修正

<<<<<<< HEAD
自分の変更内容
=======
相手の変更内容
>>>>>>> ブランチ名

<<<<<<<=======>>>>>>> を削除して正しい内容に書き直す。

3. コミット

git add .
git commit -m "resolve conflict"

マージを中止する場合

git merge --abort

ハマったポイント

  • 記号を残したままコミットしないように注意
  • こまめにpullしてコンフリクトを小さくする

関連記事