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