#!/bin/sh -e # git diff-conflicts BRANCH - which changes block merge of BRANCH? branch=${1?what to merge?} git diff -- $( { git diff-tree -r --name-only $branch $(git merge-base HEAD $branch) git ls-files -m } | sort | uniq -d )