admin管理员组

文章数量:1391960

I have some merge conflicts on files 'deleted by us', meaning some incoming changes target files that I previously deleted. Is there some way in git to list these files (with the intent to git rm on them later)?

I tried

git diff --name-only --diff-filter=D

But it seems to only account for incoming changes which delete files, not deleted files on our side that are targeted by incoming changes.

I have some merge conflicts on files 'deleted by us', meaning some incoming changes target files that I previously deleted. Is there some way in git to list these files (with the intent to git rm on them later)?

I tried

git diff --name-only --diff-filter=D

But it seems to only account for incoming changes which delete files, not deleted files on our side that are targeted by incoming changes.

Share Improve this question asked Mar 12 at 16:21 gladesglades 4,9882 gold badges22 silver badges64 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

But it seems to only account for incoming changes

That's because that's the diff you asked to see. To see changes already in the local side of the merge do git diff MERGE_HEAD... (three literal dots, see the docs) with whatever options you like.

本文标签: gitList files 39deleted by us39 in merge conflictStack Overflow