path: root/Documentation/git-diff.txt
diff options
authorAndreas Heiduk <>2017-04-11 14:39:50 (GMT)
committerJunio C Hamano <>2017-04-13 23:15:25 (GMT)
commit47242cd1037483896bb2b042e6a02c66b65b07d6 (patch)
treed2dedd59f558f3aa70238ed426eee64993d3959c /Documentation/git-diff.txt
parent49800c940790cc7465d1b03e08d472ffd8684808 (diff)
diff-files: document --ours etc.
git-diff understands "--ours", "--theirs" and "--base" for files with conflicts. But so far they were not documented for the central diff command but only for diff-files. Signed-off-by: Andreas Heiduk <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-diff.txt')
1 files changed, 14 insertions, 0 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index bbab35f..b0c1bb9 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -97,6 +97,20 @@ OPTIONS
:git-diff: 1
+-1 --base::
+-2 --ours::
+-3 --theirs::
+ Compare the working tree with the "base" version (stage #1),
+ "our branch" (stage #2) or "their branch" (stage #3). The
+ index contains these stages only for unmerged entries i.e.
+ while resolving conflicts. See linkgit:git-read-tree[1]
+ section "3-Way Merge" for detailed information.
+ Omit diff output for unmerged entries and just show
+ "Unmerged". Can be used only when comparing the working tree
+ with the index.
The <paths> parameters, when given, are used to limit
the diff to the named paths (you can give directory