X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-diff.txt;h=044cee9b425bedc7addd9a4418b553557902711b;hb=b24bace5ca9420033be83ef6c14fb092c9371fe1;hp=127d68c9620971be2854d42b7d5fbd0a6c85b356;hpb=eab90210be73a7edc043a285340f8dc8973b9f07;p=git.git diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 127d68c96..044cee9b4 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -8,7 +8,7 @@ git-diff - Show changes between commits, commit and working tree, etc SYNOPSIS -------- -'git-diff' [ --diff-options ] {0,2} [...] +'git-diff' [] {0,2} [--] [...] DESCRIPTION ----------- @@ -23,14 +23,18 @@ 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 gitlink: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. + 'git-diff' [--options] --cached [] [--] [...]:: This form is to view the changes you staged for the next - commit relative to the named . Typically you + commit relative to the named . Typically you would want comparison with the latest commit, so if you do not give , it defaults to HEAD. -'git-diff' [--options] -- [...]:: +'git-diff' [--options] [--] [...]:: This form is to view the changes you have in your working tree relative to the named . You can @@ -38,7 +42,7 @@ tree and the index file, or the index file and the working tree. branch name to compare with the tip of a different branch. -'git-diff' [--options] -- [...]:: +'git-diff' [--options] [--] [...]:: This form is to view the changes between two , for example, tips of two branches. @@ -47,6 +51,9 @@ Just in case if you are doing something exotic, it should be noted that all of the in the above description can be any . +For a more complete list of ways to spell , see +"SPECIFYING REVISIONS" section in gitlink:git-rev-parse[1]. + OPTIONS -------