利用シーン少なそうですが、mergeを実行する前にコンフリクトが起こるかどうかチェックしたくて調べたのでメモ。 git merge —no-commit topic-branchをmasterにマージしようとしてコンフリクトするケースを想定します。 まず試してみたのは--no-commitオプション。 (master) ✘ git merge topic-branch --no-commit Auto-merging src/hello.py CONFLICT (content): Merge conflict in src/hello.py Automatic merge failed; fix conflicts and then commit the result. これを付けておくとマージ時に自動コミットがされなくなりますが、コンフリクトが起こる場合もローカルファイルにはマージが実