blob: bf78e3143138136f4e2c3998799a16a19f2dc3bb [file] [log] [blame]
Junio C Hamano1a4e8412005-12-27 08:17:231git-diff-files(1)
2=================
3
4NAME
5----
6git-diff-files - Compares files in the working tree and the index
7
8
9SYNOPSIS
10--------
Junio C Hamano15567bc2011-07-23 00:51:5911[verse]
Junio C Hamanocf9c7732022-10-28 18:56:0612'git diff-files' [-q] [-0 | -1 | -2 | -3 | -c | --cc] [<common-diff-options>] [<path>...]
Junio C Hamano1a4e8412005-12-27 08:17:2313
14DESCRIPTION
15-----------
16Compares the files in the working tree and the index. When paths
17are specified, compares only those named paths. Otherwise all
18entries in the index are compared. The output format is the
Junio C Hamano1aa40d22010-01-21 17:46:4319same as for 'git diff-index' and 'git diff-tree'.
Junio C Hamano1a4e8412005-12-27 08:17:2320
21OPTIONS
22-------
23include::diff-options.txt[]
24
Junio C Hamanobd53dbf2009-01-18 18:26:3725-1 --base::
26-2 --ours::
27-3 --theirs::
28-0::
Junio C Hamano33be8212023-10-23 21:45:5429Diff against the "base" version, "our branch", or "their
Junio C Hamano1a4e8412005-12-27 08:17:2330branch" respectively. With these options, diffs for
31merged entries are not shown.
32+
Junio C Hamanoa77a5132007-06-08 16:13:4433The default is to diff against our branch (-2) and the
Junio C Hamano1a4e8412005-12-27 08:17:2334cleanly resolved paths. The option -0 can be given to
35omit diff output for unmerged entries and just show "Unmerged".
36
Junio C Hamanoeb415992008-06-08 22:49:4737-c::
38--cc::
Junio C Hamanofb56a962006-01-28 10:38:1939This compares stage 2 (our branch), stage 3 (their
Junio C Hamano33be8212023-10-23 21:45:5440branch), and the working tree file and outputs a combined
Junio C Hamanofb56a962006-01-28 10:38:1941diff, similar to the way 'diff-tree' shows a merge
42commit with these flags.
43
Junio C Hamano1a4e8412005-12-27 08:17:2344-q::
Junio C Hamano33be8212023-10-23 21:45:5445Remain silent even for nonexistent files
Junio C Hamano1a4e8412005-12-27 08:17:2346
Junio C Hamano543f8d62009-07-29 08:35:2147
Junio C Hamano1a4e8412005-12-27 08:17:2348include::diff-format.txt[]
49
Junio C Hamano1a4e8412005-12-27 08:17:2350GIT
51---
Junio C Hamanof7c042d2008-06-06 22:50:5352Part of the linkgit:git[1] suite