X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=man1%2Fgit-diff.1;h=86567ac317bb87dbe7821ae0e952db6c1fe2a06a;hb=ff65000a1149a1bad6d7d9f6bf6ec5194f5c850d;hp=063e114725a77cc3bc4a73dd88d9e1322fee5330;hpb=539910c8b8c67af123f812c42bec2dfb7077cfd4;p=git.git diff --git a/man1/git-diff.1 b/man1/git-diff.1 index 063e1147..86567ac3 100755 --- a/man1/git-diff.1 +++ b/man1/git-diff.1 @@ -57,62 +57,66 @@ The arguments are also passed to git\-diff\-* commands\&. Various ways to check your working tree .nf -$ git diff -$ git diff \-\-cached -$ git diff HEAD - - changes in the working tree since your last git\-update\-index\&. - changes between the index and your last commit; what you -would be committing if you run "git commit" without "\-a" option\&. - changes in the working tree since your last commit; what you -would be committing if you run "git commit \-a" +$ git diff \fB(1)\fR +$ git diff \-\-cached \fB(2)\fR +$ git diff HEAD \fB(3)\fR .fi +.sp +\fB1. \fRchanges in the working tree since your last git\-update\-index\&. +.br +\fB2. \fRchanges between the index and your last commit; what you would be committing if you run "git commit" without "\-a" option\&. +.br +\fB3. \fRchanges in the working tree since your last commit; what you would be committing if you run "git commit \-a" +.br + .TP Comparing with arbitrary commits .nf -$ git diff test -$ git diff HEAD \-\- \&./test -$ git diff HEAD^ HEAD - - instead of using the tip of the current branch, compare with the -tip of "test" branch\&. - instead of comparing with the tip of "test" branch, compare with -the tip of the current branch, but limit the comparison to the -file "test"\&. - compare the version before the last commit and the last commit\&. +$ git diff test \fB(1)\fR +$ git diff HEAD \-\- \&./test \fB(2)\fR +$ git diff HEAD^ HEAD \fB(3)\fR .fi +.sp +\fB1. \fRinstead of using the tip of the current branch, compare with the tip of "test" branch\&. +.br +\fB2. \fRinstead of comparing with the tip of "test" branch, compare with the tip of the current branch, but limit the comparison to the file "test"\&. +.br +\fB3. \fRcompare the version before the last commit and the last commit\&. +.br + .TP Limiting the diff output .nf -$ git diff \-\-diff\-filter=MRC -$ git diff \-\-name\-status \-r -$ git diff arch/i386 include/asm\-i386 - - show only modification, rename and copy, but not addition -nor deletion\&. - show only names and the nature of change, but not actual -diff output\&. \-\-name\-status disables usual patch generation -which in turn also disables recursive behaviour, so without \-r -you would only see the directory name if there is a change in a -file in a subdirectory\&. - limit diff output to named subtrees\&. +$ git diff \-\-diff\-filter=MRC \fB(1)\fR +$ git diff \-\-name\-status \-r \fB(2)\fR +$ git diff arch/i386 include/asm\-i386 \fB(3)\fR .fi +.sp +\fB1. \fRshow only modification, rename and copy, but not addition nor deletion\&. +.br +\fB2. \fRshow only names and the nature of change, but not actual diff output\&. \-\-name\-status disables usual patch generation which in turn also disables recursive behaviour, so without \-r you would only see the directory name if there is a change in a file in a subdirectory\&. +.br +\fB3. \fRlimit diff output to named subtrees\&. +.br + .TP Munging the diff output .nf -$ git diff \-\-find\-copies\-harder \-B \-C -$ git diff \-R - - spend extra cycles to find renames, copies and complete -rewrites (very expensive)\&. - output diff in reverse\&. +$ git diff \-\-find\-copies\-harder \-B \-C \fB(1)\fR +$ git diff \-R \fB(2)\fR .fi +.sp +\fB1. \fRspend extra cycles to find renames, copies and complete rewrites (very expensive)\&. +.br +\fB2. \fRoutput diff in reverse\&. +.br + .SH "AUTHOR"