• 0

Identify potential merge conflict files before merging

Lets say you are in a feature branch but even before you merge in the changes in your master branch into your feature branch, you want to know which files are likely to cause merge conflicts before you even initiate the merge.

The simplest way to do that is to check which are the common files that have been modified between your master branch and feature branch

git diff --name-status master..HEAD | grep M

The --name-status option annotates the files commonly modified between the two branches with an M. Grepping by that, you can get what you need.