path: root/Documentation/git-diff-files.txt
diff options
authorLinus Torvalds <>2005-11-30 05:06:10 (GMT)
committerJunio C Hamano <>2005-11-30 08:14:18 (GMT)
commit10637b84d91cf8870d1db8609a10dc5e58722378 (patch)
tree3c9caf478abc60cb208e557ce0923505b28cb3cb /Documentation/git-diff-files.txt
parent562051809589574576971c53c23aad93f8c395d9 (diff)
diff-files: -1/-2/-3 to diff against unmerged stage.
While resolving conflicted merge, it was not easy to compare the working tree file with unmerged index entries. This commit introduces new options -1/-2/-3 (with synonyms --base, --ours, and --theirs) to compare working tree files with specified stages. When none of these options are given, the command defaults to -2 if the index file is unmerged, otherwise it acts as before. [jc: majorly butchered from the version Linus originally posted.] Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-diff-files.txt')
1 files changed, 10 insertions, 0 deletions
diff --git a/Documentation/git-diff-files.txt b/Documentation/git-diff-files.txt
index 3b04bfe..b45d1e6 100644
--- a/Documentation/git-diff-files.txt
+++ b/Documentation/git-diff-files.txt
@@ -21,6 +21,16 @@ OPTIONS
+-1 -2 -3 or --base --ours --theirs, and -0::
+ Diff against the "base" version, "our branch" or "their
+ branch" respectively. With these options, diffs for
+ merged entries are not shown.
+The default is to diff against our branch (-2) if there
+is an unmerged path, and show diff for unmerged entries
+otherwise. The option -0 can be given to force diff for
+unmerged entries even when the index is unmerged.
Remain silent even on nonexisting files