summaryrefslogtreecommitdiff
path: root/Documentation/git-diff.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-diff.txt')
-rw-r--r--Documentation/git-diff.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt
index 08fd409..dd1fb32 100644
--- a/Documentation/git-diff.txt
+++ b/Documentation/git-diff.txt
@@ -23,9 +23,9 @@ tree and the index file, or the index file and the working tree.
further add to the index but you still haven't. You can
stage these changes by using linkgit:git-add[1].
+
-If exactly two paths are given, and at least one is untracked,
-compare the two files / directories. This behavior can be
-forced by --no-index.
+If exactly two paths are given and at least one points outside
+the current repository, 'git diff' will compare the two files /
+directories. This behavior can be forced by --no-index.
'git diff' [--options] --cached [<commit>] [--] [<path>...]::
@@ -64,15 +64,16 @@ forced by --no-index.
Just in case if you are doing something exotic, it should be
noted that all of the <commit> in the above description, except
-for the last two forms that use ".." notations, can be any
-<tree-ish>.
+in the last two forms that use ".." notations, can be any
+<tree>. The third form ('git diff <commit> <commit>') can also
+be used to compare two <blob> objects.
For a more complete list of ways to spell <commit>, see
-"SPECIFYING REVISIONS" section in linkgit:gitrevisions[1].
+"SPECIFYING REVISIONS" section in linkgit:gitrevisions[7].
However, "diff" is about comparing two _endpoints_, not ranges,
and the range notations ("<commit>..<commit>" and
"<commit>\...<commit>") do not mean a range as defined in the
-"SPECIFYING RANGES" section in linkgit:gitrevisions[1].
+"SPECIFYING RANGES" section in linkgit:gitrevisions[7].
OPTIONS
-------
@@ -159,8 +160,12 @@ rewrites (very expensive).
SEE ALSO
--------
-linkgit:git-difftool[1]::
- Show changes using common diff tools
+diff(1),
+linkgit:git-difftool[1],
+linkgit:git-log[1],
+linkgit:gitdiffcore[7],
+linkgit:git-format-patch[1],
+linkgit:git-apply[1]
Author
------