Git merge and conflicting files
02 Oct 2020 | tags: GitRationale TL;DR
You made a merge from master and you found many conflicting files. After working with them, you don’t know which files are still conflicting.
The solution
Git to the rescue
Easy-peasy, you can list those files still unmerged. Something like this would work:
git diff --name-only --diff-filter=U
This would list only the name of files in the diff that are not yet merged (those conflicting on this case). From the man git-diff
, the possible values of diff-filter
are:
A Added
C Copied
D Deleted
M Modified
R Renamed
T have their type (mode) changed
U Unmerged
X Unknown
B have had their pairing Broken
* All-or-none