Open rogerxu opened 6 years ago
--diff-filter=[(A|C|D|M|R|T|U|X|B)…[*]]
--diff-filter=<flag>
A
- AddedC
- CopiedD
- DeletedM
- ModifiedR
- RenamedT
- type changedU
- UnmergedX
- UnknownB
- BrokenThe B
“broken pair” status never appears directly in --name-status
output, it is only useful as an argument to the option --diff-filter
when also using the option -B
(--break-rewrites
). Using it as a filter selects files that have had at least a certain percentage of their content deleted or changed.
This “breaking” is not be terribly useful with --name-status
since the point of “breaking” is mostly to change how the diff text is generated: it eliminates context lines (unchanged lines) from the diff output instead of generating the add and remove lines that would be required around whatever “random” common subsequences the diff algorithm happened to find.
Show list of the all conflicted paths.
git diff --name-only --diff-filter=U
The upper-case letters can be downcased to exclude.
Exclude deleted paths.
git diff --name-only --diff-filter=d
Show changes which will be pushed to next commit.
$ git diff --staged
Git - git-diff Documentation