Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 1 | git-diff-files(1) |
| 2 | ================= |
| 3 | |
| 4 | NAME |
| 5 | ---- |
| 6 | git-diff-files - Compares files in the working tree and the index |
| 7 | |
| 8 | |
| 9 | SYNOPSIS |
| 10 | -------- |
Junio C Hamano | 15567bc | 2011-07-23 00:51:59 | [diff] [blame] | 11 | [verse] |
Junio C Hamano | cf9c773 | 2022-10-28 18:56:06 | [diff] [blame] | 12 | 'git diff-files' [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...] |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 13 | |
| 14 | DESCRIPTION |
| 15 | ----------- |
| 16 | Compares the files in the working tree and the index. When paths |
| 17 | are specified, compares only those named paths. Otherwise all |
| 18 | entries in the index are compared. The output format is the |
Junio C Hamano | 1aa40d2 | 2010-01-21 17:46:43 | [diff] [blame] | 19 | same as for 'git diff-index' and 'git diff-tree'. |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 20 | |
| 21 | OPTIONS |
| 22 | ------- |
| 23 | include::diff-options.txt[] |
| 24 | |
Junio C Hamano | bd53dbf | 2009-01-18 18:26:37 | [diff] [blame] | 25 | -1 --base:: |
| 26 | -2 --ours:: |
| 27 | -3 --theirs:: |
| 28 | -0:: |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 29 | Diff against the "base" version, "our branch" or "their |
| 30 | branch" respectively. With these options, diffs for |
| 31 | merged entries are not shown. |
| 32 | + |
Junio C Hamano | a77a513 | 2007-06-08 16:13:44 | [diff] [blame] | 33 | The default is to diff against our branch (-2) and the |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 34 | cleanly resolved paths. The option -0 can be given to |
| 35 | omit diff output for unmerged entries and just show "Unmerged". |
| 36 | |
Junio C Hamano | eb41599 | 2008-06-08 22:49:47 | [diff] [blame] | 37 | -c:: |
| 38 | --cc:: |
Junio C Hamano | fb56a96 | 2006-01-28 10:38:19 | [diff] [blame] | 39 | This compares stage 2 (our branch), stage 3 (their |
| 40 | branch) and the working tree file and outputs a combined |
| 41 | diff, similar to the way 'diff-tree' shows a merge |
| 42 | commit with these flags. |
| 43 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 44 | -q:: |
Junio C Hamano | 51c2ab0 | 2006-07-09 20:38:54 | [diff] [blame] | 45 | Remain silent even on nonexistent files |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 46 | |
Junio C Hamano | 543f8d6 | 2009-07-29 08:35:21 | [diff] [blame] | 47 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 48 | include::diff-format.txt[] |
| 49 | |
Junio C Hamano | 1a4e841 | 2005-12-27 08:17:23 | [diff] [blame] | 50 | GIT |
| 51 | --- |
Junio C Hamano | f7c042d | 2008-06-06 22:50:53 | [diff] [blame] | 52 | Part of the linkgit:git[1] suite |