Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

While merging some of the files failed to merge.

git status

shows both the successful and failed merges.

How to view only the unsuccessful merge files(conflict).

Currently i am using the following command to do this

 find . -name '*.cpp' -o -name '*.h' | xargs grep -l '<<<<'
share|improve this question

2 Answers 2

up vote 7 down vote accepted
git diff

This will only show failed merges after an unsuccessful merge. It has many options to configure what information you want to see. I suspect this is the exact option you are after:

 git diff --name-status --diff-filter=U

Also see http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#resolving-a-merge and http://www.kernel.org/pub/software/scm/git/docs/git-diff.html

share|improve this answer

Try this:

$ git ls-files -u
see man-git-ls-files
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.